Ejemplo n.º 1
0
    private void applyEffect()
    {
        switch (powerupType)
        {
        case "health":
            playerController.addHealth(amountHealthPowerUp);
            PlayParticle(powerupType);
            break;

        case "rage":
            gunController.ActivateRagePower(durationRagePowerUp);
            PlayParticle(powerupType);
            break;

        case "shield":
            playerController.ActivateShieldPower(durationShieldPowerUp);
            Destroy(gameObject);
            break;

        default:
            Debug.Log("Unknown powerup");
            Destroy(gameObject);
            break;
        }
    }