private void InitStreamWeaponHitFeedback(WeaponNode weapon, SelfTankNode tank, SoundController attackAsset) { Transform soundRootTransform = tank.tankSoundRoot.SoundRootTransform; weapon.Entity.AddComponent(new StreamWeaponHitFeedbackReadyComponent(this.AttachStreamSoundController(attackAsset, soundRootTransform))); }
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);
private void SetFrictionVolume(SoundController sound, TankFrictionSoundEffectComponent tankFrictionSoundEffect, Vector3 velocity) { float minValuableFrictionPower = tankFrictionSoundEffect.MinValuableFrictionPower; this.SetVolumeByVelocity(sound, velocity, minValuableFrictionPower, tankFrictionSoundEffect.MaxValuableFrictionPower); }
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; }
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); }
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(); } } }