void DestroyAllInstantiatables() { EnemyController.DestroyAll(); ForeshadowController.DestroyAll(); GateController.DestroyAll(); ExplosionController.DestroyAll(); SelfDestruct.DestroyAll(); }
void SpawnForeshadow(float secondsToEnemy = defaultForeshadow) { if (DevManager.Instance.SpawnEnemies) { Vector3 spawnPoint = GetRandomPointAlongRect(ScreenManager.Instance.PlayRectU); Debug.Log(spawnPoint); GameObject foreshadowInstance = Instantiate(foreshadow, spawnPoint, Quaternion.identity); ForeshadowController foreshadowController = foreshadowInstance.GetComponent <ForeshadowController>(); foreshadowController.secondsToEnemy = secondsToEnemy; } }