public void DestroyObjects() { StopAllCoroutines(); if (Ball != null) { DestroyImmediate(Ball.gameObject); } liveBlocksQueue.Clear(); spawner.Clear(); crystalSpawnStrategy = null; }
private CrystalSpawnStrategy GetCrystalSpawnStrategy() { if (crystalSpawnStrategy == null) { if (RandomCrystals) { crystalSpawnStrategy = new RandomCrystalSpawnStrategy(); } else { crystalSpawnStrategy = new ProgressiveCrystalSpawnStrategy(); } } return(crystalSpawnStrategy); }