Пример #1
0
        private void PlayLowEnergyFeedback(TankNode tank)
        {
            this.StopSound(tank);
            WeaponFeedbackSoundBehaviour behaviour = Object.Instantiate <WeaponFeedbackSoundBehaviour>(tank.shootingEnergyFeedbackSound.LowEnergyFeedbackSoundAsset);

            tank.shootingEnergyFeedbackSound.Instance = behaviour;
            behaviour.Play(-1f, 1f, true);
        }
Пример #2
0
        private void StopSound(TankNode tank)
        {
            WeaponFeedbackSoundBehaviour instance = tank.shootingEnergyFeedbackSound.Instance;

            if (instance)
            {
                instance.GetComponent <WeaponEnergyFeedbackFadeBehaviour>().enabled = true;
            }
        }
Пример #3
0
 private void PlayHitFeedbackSound(WeaponFeedbackSoundBehaviour asset, HitFeedbackSoundsPlayingSettingsComponent settings)
 {
     Object.Instantiate <WeaponFeedbackSoundBehaviour>(asset).Play(settings.Delay, settings.Volume, settings.RemoveOnKillSound);
 }
Пример #4
0
 public void ClearHitFeedbackSounds(KillTankSoundEffectCreatedEvent e, SingleNode <SoundListenerComponent> listener)
 {
     WeaponFeedbackSoundBehaviour.ClearHitFeedbackSounds();
 }