public void CloseAllRanges() { PathManager.ClearNode(); foreach (var cell in moveList) { cell.GetComponent <Cell>().movable = false; cell.GetComponent <Cell>().moveCell.SetActive(false); } moveList.Clear(); foreach (var cell in attackList) { //cell.GetComponent<Cell>().movabel = false; cell.GetComponent <Cell>().attackCell.SetActive(false); cell.GetComponent <Cell>().SetAttackable(false); } attackList.Clear(); }