0fdd76022d
- Add SameAsCurrentSegment mode to align new container's timeSamples with the old container's playback position, accounting for FadeInOffset - Fix BeatClock callback burst when Restart is called with a past dspTime - Add GetFirstLeafSource() for resolving playback position across nested containers - Manual BeatClock.Restart replaces OnContainerEntered subscription for accurate timing with SyncPoint
30 lines
651 B
C#
30 lines
651 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using OCES.Audio;
|
|
using UnityEngine.Audio;
|
|
|
|
namespace OCES
|
|
{
|
|
public class SetStateBind : MonoBehaviour
|
|
{
|
|
public GameState targetGameState;
|
|
public bool enableLowpass;
|
|
public Text buttonText;
|
|
|
|
Button m_button;
|
|
|
|
void Awake()
|
|
{
|
|
this.buttonText.text = this.buttonText.text.Replace("PlaceHolder", this.targetGameState.ToString());
|
|
}
|
|
|
|
|
|
public void OnButtonPressed()
|
|
{
|
|
AudioSystem.Instance.SetState(this.targetGameState);
|
|
|
|
AudioSystem.Instance.SetLowpass(this.enableLowpass);
|
|
}
|
|
}
|
|
}
|