public void SetActivePowerUp(Definitions.PowerUp powerUpToActivate) { switch (powerUpToActivate) { case Definitions.PowerUp.None: ResetAllPowerUpEffects(); break; case Definitions.PowerUp.Chilli: _motionEngine.ForceMaximumSpeed(PowerUpTimer.Chilli_Duration_In_Milliseconds); break; case Definitions.PowerUp.Wheel: ChangeHorizontalMovementDirection(); break; case Definitions.PowerUp.Shell: _motionEngine.ForceMinimumSpeed(Slow_PowerDown_Duration_In_Milliseconds); break; case Definitions.PowerUp.Horn: _motionEngine.ForceMaximumSpeed(Speed_PowerDown_Duration_In_Milliseconds); break; default: _activePowerUp = powerUpToActivate; break; } }
public void Activate(Definitions.PowerUp selectedPowerUp) { switch (selectedPowerUp) { case Definitions.PowerUp.Boots: _timerDurationInMilliseconds = Boots_Duration_In_Milliseconds; break; case Definitions.PowerUp.Chilli: _timerDurationInMilliseconds = Chilli_Duration_In_Milliseconds; break; default: _timerDurationInMilliseconds = 0; break; } if (_timerDurationInMilliseconds > 0) { _entryMotionEngine.Activate(); MotionEngine = _entryMotionEngine; _iconTexture = TextureManager.Textures[string.Concat("power-", selectedPowerUp).ToLower()]; Visible = true; } }
public void ResetAllPowerUpEffects() { _activePowerUp = Definitions.PowerUp.None; _motionEngine.ClearForcedMovementSpeed(); }
public void StartAttackSequence(Definitions.PowerUp attackPowerUp) { LastAttackPowerUp = attackPowerUp; LastAttackPowerUpTimeInMilliseconds = TotalRaceTimeElapsedInMilliseconds; }