private bool CloseEnemyExist() { if (unitsList.GetAllEnemies().Length > 0) { foreach (Unit enemy in unitsList.GetAllEnemies()) { if (pathFinder.CanAttack(enemy)) { return(true); } } } return(false); }
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(); } } }