public void PlayOneShot(string name, float volume = 1.0f) { AudioClip clip = GetAudioClip(name); if (clip == null) { return; } volume = volume * MasterSEVolume.GetValue() * MasterVolume.GetValue() * (AudioEnable.GetValue() ? 1.0f : 0.0f); audioSource.PlayOneShot(clip, volume); }
public MyVibrationManager() { enable = new RegisterBoolParameter("VibrationEnable", true); SetEnable(enable.GetValue()); }