示例#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;
            }
        }
 private void PlayHitFeedbackSound(WeaponFeedbackSoundBehaviour asset, HitFeedbackSoundsPlayingSettingsComponent settings)
 {
     Object.Instantiate <WeaponFeedbackSoundBehaviour>(asset).Play(settings.Delay, settings.Volume, settings.RemoveOnKillSound);
 }
 public void ClearHitFeedbackSounds(KillTankSoundEffectCreatedEvent e, SingleNode <SoundListenerComponent> listener)
 {
     WeaponFeedbackSoundBehaviour.ClearHitFeedbackSounds();
 }