Add : Rtpc progression on staircase + events

This commit is contained in:
Jahnisse
2026-06-17 15:59:05 +02:00
parent 3446cb9ba3
commit 7efef2e8bc
6 changed files with 84 additions and 4 deletions
+13 -1
View File
@@ -8,6 +8,7 @@ using UnityEngine;
using UnityEngine.Events;
using UnityEngine.InputSystem;
using UnityEngine.Rendering.Universal;
using static UnityEngine.Rendering.DebugUI;
public class SpiralStaircase : MonoBehaviour
{
@@ -117,7 +118,11 @@ public class SpiralStaircase : MonoBehaviour
void Update()
{
if (_state.PlayerInside)
{
Count();
SetRtpc();
}
}
void OnTriggerEnter(Collider col)
@@ -208,7 +213,7 @@ public class SpiralStaircase : MonoBehaviour
private void Count()
{
if (!OctoPlayer.Instance) return;
Vector2[] steps = new Vector2[4] { Vector2.up, Vector2.left, Vector2.down, Vector2.right };
Vector2 nextStep = steps[_state.Quarters % steps.Length];
@@ -288,4 +293,11 @@ public class SpiralStaircase : MonoBehaviour
}
}*/
}
//--Sound--------------
private void SetRtpc()
{
float rtpcValue = _state.TotalProgression;
AKRESULT aKRESULT = AkSoundEngine.SetRTPCValue("BinauralFREQ_Rtpc", rtpcValue);
}
}