void SpawnPlayerTankLater() { if (MapManager.IsGameOver) { return; } if (PlayerTank.Instance != null) { return; } if (EnemyTankSpawner.CanSpawnTankAt(FindObjectOfType <PlayerSpawn>().Position)) { SpawnPlayerTank(); } else { this.Invoke(nameof(SpawnPlayerTankLater), 1f); } }
void Awake() { Instance = this; }