private void HandleMovementInput() { GridTile selection = GridTile.CurrentlySelected; if (lastSelected != selection) { // Update pathline if (!IsMoving()) { UpdatePathLine(); } lastSelected = selection; } else if (selection == null) { return; } if (Input.GetMouseButtonDown(0)) { // Move unit to selected tile if it is reachable if (selection.GetHighlight() == GridTile.TileHighlights.Movement || selection.GetHighlight() == GridTile.TileHighlights.ActiveUnit) { // Check if mid-animation if (!ActiveUnit.UnitEntity.IsMoving) { ActiveUnit.UnitEntity.StartMoveAnimation(selection.Coordinates); } } } }
private void HandleTargetInput() { GridTile selection = GridTile.CurrentlySelected; if (selection == null) { return; } if (Input.GetMouseButtonDown(0)) { // Use skill on selected target if it is valid if (selection.GetHighlight() == GridTile.TileHighlights.AoE) { ActiveSkill.ActivateSkill(ActiveUnit, selection.Coordinates); //NextTurn(); } } }