Beispiel #1
0
    // When a powerup is picked up
    // Instantiate it and initialize it
    private void OnPowerupPickup(Collectable collectable)
    {
        if (!GameManager.IterateLevel)
        {
            return;
        }

        if (collectable.CollectableType == Collectable.CollectableTypes.Powerup)
        {
            currentPowerup = Instantiate(collectable.SelectedPowerup);
            currentPowerup.InitializePowerup(this);
        }
    }