Example #1
0
        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();
        }
Example #2
0
        private void UpdateHitSoundsIfNeeded(WeaponStreamHitSoundsEffectComponent effect, StreamHitComponent hit)
        {
            bool flag = !ReferenceEquals(hit.StaticHit, null);

            if (effect.IsStaticHit != flag)
            {
                this.UpdateHitSoundsByForce(effect, hit);
            }
        }
Example #3
0
        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;
            }
        }