// Set's a unit to be the current unit in focus public void selectFocus(UnitScript unit) { if (!paused) { focusedUnit = unit; updateHexes(); if (unit != null && unit.getState() < 1) { List<HexScript> mapRow = Map.map [(int)unit.getPosition ().x]; HexScript curHex = mapRow [(int)unit.getPosition ().y]; // Reinitialize the hexSet to an empty set hexSet = new HashSet<HexScript>(); // Populate the hexSet with moveable hexes hexSet = Map.unit_move_range(focusedUnit, true); //findMovement (focusedUnit.getMovement (), (Map.map [(int)focusedUnit.getPosition ().x]) [(int)focusedUnit.getPosition ().y], false); // For each moveable hex, indicate that it is moveable /*foreach (HexScript moveable in hexSet) { moveable.setFocus (true); }*/ focusedHex = curHex; curHex.setFocus(true); } } }