Пример #1
0
        //IEnumerator RestartTank()
        //{
        //    yield return new WaitForSeconds(3f);
        //    SpawnerService.Instance.SpawnTanks(0);
        //}
        public void SpawnTankPrefab(Transform spawner, int tankSerial)
        {
            TankModel      model = new TankModel(tankList.tankScriptableObject[0]);
            TankController tank  = new TankController(model, tankView, spawner);

            tanks.Add(tank);
            //return tank;
        }
Пример #2
0
 public void DestroyTank(TankController controller)
 {
     //StartCoroutine(RestartTank());
     for (int i = 0; i < tanks.Count; i++)
     {
         if (controller == tanks[i])
         {
             controller.Destroy();
             SetPlayerDeathCounter(controller);
         }
     }
     StartCoroutine(DestroySsceneObjects());
 }
Пример #3
0
 public void InitialiseController(TankController tankController)
 {
     controller = tankController;
 }
Пример #4
0
 private void SetPlayerDeathCounter(TankController controller)
 {
     playerDeathCounter++;
     EventService.Instance.OnPlayerDeath(playerDeathCounter);
 }