Esempio n. 1
0
    public void Clear()
    {
        Debug.Log("Clear Battle!!");
        GameObject[] tanks = GameObject.FindGameObjectsWithTag("Tank");
        for (int i = 0; i < tanks.Length; i++)
        {
            Destroy(tanks[i]);
        }
        WatchBattle wb = gameObject.GetComponent <WatchBattle> ();

        wb.SetWatchMode(false);
        battleStart = false;
    }
Esempio n. 2
0
 public void SetDead(TankBeheavior tank, bool isPlayer = false)
 {
     for (int i = 0; i < battleTanks.Length; i++)
     {
         if (tank == battleTanks [i].tank)
         {
             battleTanks [i].dead = true;
             if (isPlayer)
             {
                 WatchBattle wb = gameObject.GetComponent <WatchBattle> ();
                 wb.SetWatchMode(isPlayer, battleTanks [i].camp);
             }
             Debug.Log(tank.name + " Dead!");
         }
     }
 }