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);
        }
    }
}
