Esempio n. 1
0
    public void SetPowerUp(int type)
    {
        LogManager.AddPlayerPowerPicked(playerNumber, type);
        // 0  vermelho + força no tiro
        // 1 azul + rapido
        // 2 amarelo sem parar
        powerActive = true;
        powerType   = type;

        if (type == 0)
        {
            psmain.startColor = gunLine.material.color = gunLight.color = Color.red;
            damagePerShot     = 70;
            powerTime         = basePowerTime;
        }
        else if (type == 1)
        {
            psmain.startColor  = gunLine.material.color = gunLight.color = Color.blue;
            timeBetweenBullets = 0.1f;
            powerTime          = basePowerTime;
        }
        else if (type == 2)
        {
            psmain.startColor = gunLine.material.color = gunLight.color = Color.white;
            range             = 150.0f;
            powerTime         = basePowerTime;
        }
    }