public override void DragEnd(int button) { if (button == 1) { Coords tile = InputController.GetCoordsUnderMouse(); if (WorldGraphics.ValidCoords(tile)) { CommunicationController.ExecuteCommand(ClientController.activePlayer, new CommandMove(tile)); } InputController.ChangeState(new DefaultState()); } }
public static void Update() { inputState.Update(); HandleMouse(0); HandleMouse(1); Coords newHoverTile = GetCoordsUnderMouse(); if (WorldGraphics.ValidCoords(newHoverTile) && newHoverTile != hoverTile) { hoverTile = newHoverTile; inputState.HoverEnter(hoverTile); } }