예제 #1
0
    public void VerifyPowerUpInstance()
    {
        if (this.gameObject.name.Contains("TripleShoot"))
        {
            PowerUpStatus = Enums.PowerUp.TripleShoot;
        }

        if (this.gameObject.name.Contains("Shield"))
        {
            PowerUpStatus = Enums.PowerUp.Shield;
        }

        if (this.gameObject.name.Contains("Speed"))
        {
            PowerUpStatus = Enums.PowerUp.Speed;
        }
    }
예제 #2
0
    public void SetActivePowerUp(Enums.PowerUp powerUp)
    {
        switch ((int)powerUp)
        {
        case 0:
            Player.EnableTripleShoot(PowerUpTime);
            break;

        case 1:
            Player.EnableSpeed(PowerUpTime, SpeedBoost);
            break;

        case 2:
            Player.EnableShield(PowerUpTime);
            break;
        }
    }