Esempio n. 1
0
 private bool CloseEnemyExist()
 {
     if (unitsList.GetAllEnemies().Length > 0)
     {
         foreach (Unit enemy in unitsList.GetAllEnemies())
         {
             if (pathFinder.CanAttack(enemy))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 2
0
 public void HideActions()
 {
     foreach (Cell cell in cellManager.GetAllCells())
     {
         if (cell != null)
         {
             cell.GetComponent <Renderer>().material.color = Color.white;
         }
     }
     if (unitsList.GetAllEnemies().Length > 0)
     {
         foreach (Unit unit in unitsList.GetAllEnemies())
         {
             unit.statHUD.RemoveHighlighting();
             unit.HideDamage();
         }
     }
 }