コード例 #1
0
 protected virtual void SpawnApples(GenericPool pool, float chance)
 {
     for (var i = 0; i < spawns.Length; i++)
     {
         if (Random.Range(1, 100) <= chance)
         {
             var apple = pool.GetActiveGameObject();
             apple.GetComponent <AppleController>().originalPool = pool;
             apple.transform.position = spawns[i].position;
             apple.transform.rotation = spawns[i].rotation;
         }
     }
 }