private void InitStreamWeaponHitFeedback(WeaponNode weapon, SelfTankNode tank, SoundController attackAsset)
        {
            Transform soundRootTransform = tank.tankSoundRoot.SoundRootTransform;

            weapon.Entity.AddComponent(new StreamWeaponHitFeedbackReadyComponent(this.AttachStreamSoundController(attackAsset, soundRootTransform)));
        }
Example #2
0
 public IsisHitFeedbackReadyComponent(SoundController healingSoundController, SoundController attackSoundController)
 {
     this.HealingSoundController = healingSoundController;
     this.AttackSoundController  = attackSoundController;
 }
 private SoundController AttachStreamSoundController(SoundController asset, Transform root) =>
 Object.Instantiate <SoundController>(asset, root.position, root.rotation, root);
Example #4
0
        private void SetFrictionVolume(SoundController sound, TankFrictionSoundEffectComponent tankFrictionSoundEffect, Vector3 velocity)
        {
            float minValuableFrictionPower = tankFrictionSoundEffect.MinValuableFrictionPower;

            this.SetVolumeByVelocity(sound, velocity, minValuableFrictionPower, tankFrictionSoundEffect.MaxValuableFrictionPower);
        }
Example #5
0
 private void SetFriction(SoundController actualSource, SoundController stopSource, TankFrictionSoundEffectComponent tankFrictionSoundEffect, Vector3 velocity)
 {
     this.SetFrictionVolume(actualSource, tankFrictionSoundEffect, velocity);
     actualSource.FadeIn();
     stopSource.FadeOut();
 }
 public HolyshieldSoundEffectInstanceComponent(SoundController instance)
 {
     this.Instance = instance;
 }
Example #7
0
        public void UpdateIsisSoundMode(UpdateIsisSoundModeEvent evt, IsisCurrentSoundTeamEffectNode weapon, TankTeamNode target)
        {
            SoundController soundController = (weapon.teamGroup.Key != target.teamGroup.Key) ? weapon.isisDamagingSoundEffect.SoundController : weapon.isisHealingSoundEffect.SoundController;

            this.UpdateIsisSoundEffect(weapon.isisCurrentSoundEffect, soundController);
        }
Example #8
0
 private void UpdateIsisSoundEffect(IsisCurrentSoundEffectComponent isisCurrentSoundEffect, SoundController soundController)
 {
     if (!isisCurrentSoundEffect.WasStopped)
     {
         if (!isisCurrentSoundEffect.WasStarted)
         {
             isisCurrentSoundEffect.SoundController = soundController;
             isisCurrentSoundEffect.WasStarted      = true;
             soundController.FadeIn();
         }
         else if (isisCurrentSoundEffect.SoundController != soundController)
         {
             isisCurrentSoundEffect.SoundController.FadeOut();
             isisCurrentSoundEffect.SoundController = soundController;
             soundController.FadeIn();
         }
     }
 }