public void StartChargingShot() { ShakeComponent playerShake = Owner.FindComponent <ShakeComponent>(); playerShake.StartShake(); Color color = Ball.LastPlayer.Team.ColorScheme.Color1; PlayerChargedShotFx playerChargedShotCmp = new PlayerChargedShotFx(); Owner.Attach(playerChargedShotCmp); playerChargedShotCmp.Color = color; m_chargedShotTimer.Reset(); m_chargedShotTimer.Start(); m_chargingShot = true; m_audioCmpCharge.Play(); }
public void StopChargingShot() { ShakeComponent playerShake = Owner.FindComponent <ShakeComponent>(); if (playerShake != null) { playerShake.StopShake(); } PlayerChargedShotFx playerChargedShotCmp = Owner.FindComponent <PlayerChargedShotFx>(); if (playerChargedShotCmp != null) { playerChargedShotCmp.Stop(); } m_chargedShotTimer.Stop(); m_chargingShot = false; m_audioCmpCharge.Stop(); }