15 lines
355 B
C#
15 lines
355 B
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
[RequireComponent(typeof(Slider))]
|
|
public class SliderEventReceiver : MonoBehaviour {
|
|
|
|
public string onClickPlaySEFilename;
|
|
|
|
void Awake(){
|
|
GetComponent<Slider>().onValueChanged.AddListener(value => {
|
|
SoundManager.Instance.PlaySE(string.Format("Sounds/SE/{0}", onClickPlaySEFilename));
|
|
});
|
|
}
|
|
}
|