Exemple #1
0
 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());
     }
 }
Exemple #2
0
        public static void Update()
        {
            inputState.Update();
            HandleMouse(0);
            HandleMouse(1);

            Coords newHoverTile = GetCoordsUnderMouse();

            if (WorldGraphics.ValidCoords(newHoverTile) && newHoverTile != hoverTile)
            {
                hoverTile = newHoverTile;
                inputState.HoverEnter(hoverTile);
            }
        }