Пример #1
0
 public Joystick(Axis horizontal, Axis vertical)
 {
     mHorizontal = horizontal;
     mVertical = vertical;
 }
Пример #2
0
        /*
         * Sets horizontal axis of the joystick.
         *
         * Returns:
         *      Returns true if the axis was set.
         *
         * Preconditions:
         *      'horizontal' must not be null
         */
        bool setHorizontalAxis(Axis horizontal)
        {
            if (horizontal == null)
                return false;

            mHorizontal = horizontal;

            return true;
        }
Пример #3
0
        /*
         * Sets vertical axis of the joystick.
         *
         * Returns:
         *      Returns true if the axis was set.
         *
         * Preconditions:
         *      'vertical' must not be null
         */
        bool setVerticalAxis(Axis vertical)
        {
            if (vertical == null)
                return false;

            mVertical = vertical;

            return true;
        }