示例#1
0
 public void ActivatePowerUp(PowerUpTypes powerUpType, bool activate)
 {
     if (activate)
     {
         // deactivate the current power up (if a power up is active) and activate the new one
         powerUpManager.DeactivatePowerUp();
         powerUpManager.ActivatePowerUp(powerUpType);
         audioManager.PlaySoundEffect(SoundEffects.PowerUpSoundEffect);
     }
     playerController.ActivatePowerUp(powerUpType, activate);
     guiManager.ActivatePowerUp(powerUpType, activate, dataManager.GetPowerUpLength(powerUpType));
 }
 public void ActivatePowerUp(PowerUpTypes powerUpType)
 {
     activePowerUp = powerUpType;
     activePowerUpData.duration = dataManager.GetPowerUpLength(powerUpType);
     StartCoroutine("RunPowerUp");
 }