public void PlayBell() { if (!_bell.IsPlaying()) { _bell.Play(); } }
public void Awake() { if (_instance == null) { _instance = this; DontDestroyOnLoad(gameObject); _music = new FMODObject("event:/Music"); _music.SetParameter("Music1", 0.0f); _music.SetParameter("Music2", 0.0f); _music.SetParameter("Music3", 0.0f); _music.SetParameter("Percussion", 0.0f); _music.Play(); _wind = new FMODObject("event:/Wind"); _bell = new FMODObject("event:/Bell"); _bell.SetParameter("Volume", Bell); _steps = new FMODObject("event:/Steps"); _shovel = new FMODObject("event:/Shovel"); _pickupCoffin = new FMODObject("event:/PickupCoffin"); _throwCoffin = new FMODObject("event:/ThrowCoffin"); _cart = new FMODObject("event:/CartLoop"); _cart.SetParameter("Volume", 0.75f); _raiseTomb = new FMODObject("event:/RaiseTomb"); _tones = new FMODObject("event:/Tones"); _door = new FMODObject("event:/GiantDoor"); } else { Destroy(gameObject); } }
public void PlaySteps() { if (StepsSpeed == 0.0f) { return; } if (_steps.IsPlaying()) { if (_steps.GetNormalizedTimelinePosition() >= 1 - StepsSpeed) { _steps.Play(); } } else { _steps.Play(); } }
public void FadeInWind() { _wind.Play(); StartCoroutine(Fade(_wind, "Volume", Wind, WindFadeTime)); }
public void PlayShovel() { _shovel.Play(); }
public void PlayDoor() { _door.Play(); }
public void PlayTone() { _tones.Play(); }
public void PlayRaiseTomb() { _raiseTomb.Play(); }
public void PlayCart() { _cart.Play(); }
public void PlayThrowCoffin() { _throwCoffin.Play(); }
public void PlayPickupCoffin() { _pickupCoffin.Play(); }