Ejemplo n.º 1
0
    //Control input events
    private void Update()
    {
        SetTouch();

        #if !MOBILE
        MouseMoved();
        if (inputX.MouseRightClick())
        {
            MouseRightClick(inputX.MouseAxis());
        }
        if (inputX.MouseLeftClick())
        {
            MouseLeftClick(inputX.MouseAxis());
        }
        if (inputX.MouseLeftRelease())
        {
            MouseLeftRelease();
        }
        if (inputX.MouseMiddleClick())
        {
            MouseMiddleClick();
        }
        if (inputX.MouseMiddleRelease())
        {
            MouseMiddleRelease();
        }

        MouseWheelMove();
        //if (Mathf.Abs(inputX.Vertical()) >= .01f || Mathf.Abs(inputX.Horizontal()) >= .01f)
        KeyboardMovePressed();

        if (inputX.isSpacePressed())
        {
            PressedSpace();
        }

        if (inputX.isSpaceReleased())
        {
            ReleasedSpace();
        }

        if (inputX.isShiftPressed())
        {
            PressedShift();
        }

        if (inputX.isShiftReleased())
        {
            ReleasedShift();
        }

        if (inputX.isPressedKey(KeyCode.E))
        {
            PressedKey(KeyCode.E);
        }

        if (inputX.isReleasedKey(KeyCode.E))
        {
            ReleasedKey(KeyCode.E);
        }
        #endif
    }