public void FoundPowerOrb()
 {
     // If player finds another powerOrb before last one was disabled
     if (powerMode)
     {
         CancelInvoke("DisablePowerMode");
     }
     powerMode             = true;
     spriteRenderer.sprite = playerPow;
     powerIndicator.activate();
     // Disable the power orb in 10 seconds
     Invoke("DisablePowerMode", 10.0f);
 }
Esempio n. 2
0
 public void FoundSpeedOrb()
 {
     // If player finds another speedOrb before last one was disabled
     if (speedMode)
     {
         CancelInvoke("DisableSpeedMode");
     }
     speedMode             = true;
     spriteRenderer.sprite = powerUp;
     // increase firerate by 3x
     fireRate = fireRateDefault / 3;
     speedIndicator.activate();
     // Disable the speed orb in 10 seconds
     Invoke("DisableSpeedMode", 10.0f);
 }