Пример #1
0
    public void ActivatePowerUp(PowerUp powerUp)
    {
        if (powerUp.overwrite)
        {
            activePowerup?.Remove(this);

            activePowerup       = powerUp;
            timer               = powerUp.duration;
            duration            = powerUp.duration;
            powerupSlider.value = 1f;
        }

        powerUp.Apply(this);
    }
Пример #2
0
 public PowerUp GetPowerUp(GameObject go)
 {
     powerUp.Apply(go);
     Destroy(this.gameObject);
     return(powerUp);
 }