Beispiel #1
0
    public void SpawnBeer(int laneIndex)
    {
        if (beerPool.Count <= 0)
        {
            PreSpawn();
        }

        Beer beer = beerPool.Dequeue();

        beer.gameObject.SetActive(true);
        beer.Fly(lanes[laneIndex].transform.position.y, beerSpeed, laneIndex);
    }