Example #1
0
        void SpawnPlayerTankLater()
        {
            if (MapManager.IsGameOver)
            {
                return;
            }

            if (PlayerTank.Instance != null)
            {
                return;
            }

            if (EnemyTankSpawner.CanSpawnTankAt(FindObjectOfType <PlayerSpawn>().Position))
            {
                SpawnPlayerTank();
            }
            else
            {
                this.Invoke(nameof(SpawnPlayerTankLater), 1f);
            }
        }
Example #2
0
 void Awake()
 {
     Instance = this;
 }