Пример #1
0
 public void PlayExplosionSound(MineExplosionEvent e, MineNode mine, [JoinAll] SingleNode <SoundListenerBattleStateComponent> soundListener)
 {
     if (mine.mineSounds.ExplosionSound)
     {
         mine.mineSounds.ExplosionSound.Play();
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
 public void StopRunningSound(MineExplosionEvent e, SpiderSoundsNode mine)
 {
     mine.spiderMineSounds.RunSoundController.FadeOut();
 }
Пример #4
0
 public void Explosion(MineExplosionEvent e, MineExplosionNode mine)
 {
     ModuleEffectGraphicsSystem.InstantiateEffectEffect(mine.effectInstance, mine.mineExplosionGraphics.EffectPrefab, mine.mineExplosionGraphics.ExplosionLifeTime, mine.mineExplosionGraphics.Origin);
 }