Replace UltimateXR with HurricaneVR

This commit is contained in:
2024-08-08 17:01:07 +02:00
parent e8658374d6
commit fb21dbbb73
5932 changed files with 358362 additions and 2174150 deletions

View File

@@ -0,0 +1,49 @@
using HurricaneVR.Framework.Core.Utils;
using UnityEngine;
namespace HurricaneVR.TechDemo.Scripts
{
public class DemoGlassRotate : MonoBehaviour
{
public float Timer = 5f;
public float Degrees = 135;
public bool Unlocked;
public bool DoneRotating;
public AudioClip SFXOpen;
private float _elapsed;
void Start()
{
}
void Update()
{
if (!Unlocked || DoneRotating)
return;
_elapsed += UnityEngine.Time.deltaTime;
transform.localRotation = transform.localRotation * Quaternion.Euler(new Vector3(-Degrees / Timer * Time.deltaTime, 0f, 0f));
if (_elapsed > Timer)
{
_elapsed = 0f;
DoneRotating = true;
}
}
public void Unlock()
{
if (!Unlocked)
{
if(SFXPlayer.Instance) SFXPlayer.Instance.PlaySFX(SFXOpen, transform.position);
}
Unlocked = true;
}
}
}