using System.Collections;
using System.Collections.Generic;
using OCES.Audio;
using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI;

public class PlaySoundBind : MonoBehaviour
{
    public CallbackFlags callbackFlags;
    public InputField inputField;
    
    public void PlaySound()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.Play(audioId);
    }
    
    public void StopSound()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.Stop(audioId);
    }

    public void PlaySoundOnTrigger()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.PlayOnTrigger(audioId, this.callbackFlags);
    }
}
