Example #1
0
    void Spawn(POWERUPS powerup)
    {
        //Debug.Log("Spawning " + powerup);
        GameObject spawned = ObjectPooler.Instance.GetPooledObject(powerup.ToString());

        if (spawned != null)
        {
            spawned.transform.localPosition = SpawnManager.Instance.spawner.RandomizePositionOnBounds();
            spawned.SetActive(true);
        }
        else
        {
            Debug.LogWarning(spawned + " does not exist!");
        }
    }
Example #2
0
 public void SetPowerUp(POWERUPS n_PowerUp)
 {
     CurrPowerUp = n_PowerUp;
 }