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

public class SetPropertyBind : MonoBehaviour
{
    public InputField inputField;
    public float targetValue;
    
    public void SetVolume()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.SetVolume(audioId, this.targetValue);
    }

    public void SetPitch()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.SetPitch(audioId, this.targetValue);
    }
    
    public void ResetVolume()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.ResetVolume(audioId);
    }
    
    public void ResetPitch()
    {
        uint.TryParse(this.inputField.text, out uint audioId);
        AudioSystem.Instance.ResetPitch(audioId);
    }
}
