示例#1
0
 public void Collect()
 {
     runManager.InreaseCoinAmount();
     Debug.Log("Zebrano monetę, ilość monet: " + runManager.CoinAmount);
     poolMember.Despawn();
     nextCoinPosition = levelPlanner.GenerateNextCoinPosition();
     poolMember.myPool.Spawn(nextCoinPosition, Quaternion.identity);
 }
示例#2
0
 void InitializeCoins()
 {
     coinPool = new ObjectPooler(coinPrefab, 10);
     for (int i = 0; i < 10; i++)
     {
         coinPool.Spawn(levelPlanner.GenerateNextCoinPosition(), Quaternion.identity);
     }
 }