Replace UltimateXR with HurricaneVR
This commit is contained in:
29
Assets/HurricaneVR/TechDemo/Scripts/DemoLeverDisplay.cs
Normal file
29
Assets/HurricaneVR/TechDemo/Scripts/DemoLeverDisplay.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HurricaneVR.TechDemo.Scripts
|
||||
{
|
||||
public class DemoLeverDisplay : MonoBehaviour
|
||||
{
|
||||
private int _step;
|
||||
private float _angle;
|
||||
private TextMeshPro _tm;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_tm = GetComponent<TextMeshPro>();
|
||||
}
|
||||
|
||||
public void OnStepChanged(int step)
|
||||
{
|
||||
_step = step;
|
||||
_tm.text = $"{_step}/{_angle:f0}";
|
||||
}
|
||||
|
||||
public void OnAngleChanged(float angle, float delta)
|
||||
{
|
||||
_angle = angle;
|
||||
_tm.text = $"{_step}/{_angle:f0}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user