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; } } }