private void UpdateHitSoundsByForce(WeaponStreamHitSoundsEffectComponent effect, StreamHitComponent hit) { bool flag = !ReferenceEquals(hit.StaticHit, null); effect.IsStaticHit = flag; effect.SoundController.StopImmediately(); effect.SoundController.Source.clip = !flag ? effect.TargetHitClip : effect.StaticHitClip; effect.SoundController.SetSoundActive(); }
private void UpdateHitSoundsIfNeeded(WeaponStreamHitSoundsEffectComponent effect, StreamHitComponent hit) { bool flag = !ReferenceEquals(hit.StaticHit, null); if (effect.IsStaticHit != flag) { this.UpdateHitSoundsByForce(effect, hit); } }
private void UpdateHitSoundPosition(WeaponStreamHitSoundsEffectComponent effect, StreamHitComponent hit) { bool flag2 = !ReferenceEquals(hit.TankHit, null); if (!ReferenceEquals(hit.StaticHit, null)) { effect.SoundController.gameObject.transform.position = hit.StaticHit.Position; } if (flag2) { effect.SoundController.gameObject.transform.position = hit.TankHit.TargetPosition; } }