public void PlayExplosionSound(MineExplosionEvent e, MineNode mine, [JoinAll] SingleNode <SoundListenerBattleStateComponent> soundListener) { if (mine.mineSounds.ExplosionSound) { mine.mineSounds.ExplosionSound.Play(); } }
public void PlayExplosionSound(MineExplosionEvent e, IceTrapNode effect, [JoinAll] SingleNode <SoundListenerBattleStateComponent> soundListener) { Transform transform = effect.effectInstance.GameObject.transform; GetInstanceFromPoolEvent eventInstance = new GetInstanceFromPoolEvent { Prefab = effect.iceTrapExplosionSound.ExplosionSoundAsset, AutoRecycleTime = effect.iceTrapExplosionSound.Lifetime }; base.ScheduleEvent(eventInstance, effect); Transform instance = eventInstance.Instance; GameObject gameObject = instance.gameObject; instance.position = transform.position; instance.rotation = transform.rotation; gameObject.SetActive(true); Object.DontDestroyOnLoad(gameObject); }
public void StopRunningSound(MineExplosionEvent e, SpiderSoundsNode mine) { mine.spiderMineSounds.RunSoundController.FadeOut(); }
public void Explosion(MineExplosionEvent e, MineExplosionNode mine) { ModuleEffectGraphicsSystem.InstantiateEffectEffect(mine.effectInstance, mine.mineExplosionGraphics.EffectPrefab, mine.mineExplosionGraphics.ExplosionLifeTime, mine.mineExplosionGraphics.Origin); }