0e4caa1119
- Add AudioConsts.cs with Cues, NameDictionaries, and Parameters classes - Remove AudioEnumIds.cs, AudioEnums.cs, and AudioObjectDefinitions.cs - Update AudioObject.cs to include CueName property and serialization - Update AudioSystem.cs to use new NameDictionaries and Parameters classes - Update SetStateBind.cs to use Parameters.GameState type - Change UI text from "PlaySound" to "StopSound" in SampleScene.unity - Update binary audio data file AudioObject.bytes
30 lines
662 B
C#
30 lines
662 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using OCES.Audio;
|
|
using UnityEngine.Audio;
|
|
|
|
namespace OCES
|
|
{
|
|
public class SetStateBind : MonoBehaviour
|
|
{
|
|
public Parameters.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);
|
|
}
|
|
}
|
|
}
|