Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
        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;
            }
        }
Esempio n. 3
0
 public void ResetAllPowerUpEffects()
 {
     _activePowerUp = Definitions.PowerUp.None;
     _motionEngine.ClearForcedMovementSpeed();
 }
Esempio n. 4
0
 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;
     }
 }
Esempio n. 5
0
 public void ResetAllPowerUpEffects()
 {
     _activePowerUp = Definitions.PowerUp.None;
     _motionEngine.ClearForcedMovementSpeed();
 }
 public void StartAttackSequence(Definitions.PowerUp attackPowerUp)
 {
     LastAttackPowerUp = attackPowerUp;
     LastAttackPowerUpTimeInMilliseconds = TotalRaceTimeElapsedInMilliseconds;
 }