private void ActionButtonMappingMoveTo_ActionTriggered(object sender, ActionTriggeredEventArgs e) { Point worldPosition = ScreenToWorld(e.MouseState.Position); if (world.PlayerCharacter.MovingToPosition != worldPosition) { world.PlayerCharacter.SetMoveToPosition(worldPosition); network.MoveTo(world.PlayerCharacter.Id, worldPosition); } if (lastMovementClickTicks + doubleClickSpeed.Ticks >= e.GameTime.TotalGameTime.Ticks) { if (world.PlayerCharacter.AimToPosition != worldPosition) { world.PlayerCharacter.SetAimToPosition(worldPosition); network.AimTo(world.PlayerCharacter.Id, worldPosition); } } lastMovementClickTicks = e.GameTime.TotalGameTime.Ticks; }