Exemple #1
0
    public IEnumerator UsePowerup(Powerup thisPowerup)
    {
        thisPowerup.Buff();
        yield return(new WaitForSeconds(thisPowerup.Duration));

        if (thisPowerup != null)
        {
            thisPowerup.DeBuff();
        }
        Destroy(thisPowerup);
    }