Ejemplo n.º 1
0
    private Direction UpdateProcessDirection()
    {
        Direction processDirection;
        Vector3   currentMousePosition   = MouseBoundry.GetMousePosition();
        Vector3   lastMouseClickPosition = MouseBoundry.LastMouseClickPosition;

        if (WasHorizontalMoveInReferenceToLastClick)
        {
            if (currentMousePosition.x > lastMouseClickPosition.x)
            {
                processDirection = Direction.Right;
            }
            else
            {
                processDirection = Direction.Left;
            }
        }
        else
        {
            if (currentMousePosition.y > lastMouseClickPosition.y)
            {
                processDirection = Direction.Up;
            }
            else
            {
                processDirection = Direction.Down;
            }
        }
        return(processDirection);
    }
 public void Execute()
 {
     MouseBoundry.LastMouseClickPosition    = MouseBoundry.GetMousePosition();
     MouseBoundry.LastMouseClickMazeElement = MouseBoundry.CurrentMouseOnMazeElement;
     MouseBoundry.CurrentMouseOnMazeElement.ChangeOnNormalScale();
     MouseBoundry.CurrentMouseOnMazeElement.ChangeOnMazeWallColor();
 }
 public void UpdatePermitterParameters()
 {
     inputMousePositionVec = mouse.GetMousePosition();
     offset = cameraMovementController.Offset;
     currentCameraPosition = cameraMovementController.CurrentCameraPosition;
     gamePlaneBounds       = elementsBounds.GamePlaneBounds;
     screenDim             = new Vector2(cameraMovementController.ScreenWidth, cameraMovementController.ScreenHeight);
 }