Example #1
0
        public bool setInput(Hotkey negative, Hotkey postive)
        {
            //Argument Checking
            if (negative == null || postive == null || negative == postive)
                return false;

            mIsAxis = false;
            mIsKeys = true;

            mNegative = negative;
            mPositive = postive;

            return true;
        }
Example #2
0
 public Axis(Hotkey negative, Hotkey positive)
 {
     setInput(negative, positive);
 }
Example #3
0
        /*
         * Sets the axis to a pair of keys
         *
         * Precondition:
         *      'negative' and 'postive' must not be the same key
         */
        public bool setInput(Button negative, Button postive)
        {
            //Argument Checking
            if (negative == null || postive == null || negative == postive)
                return false;

            mIsAxis = false;
            mIsKeys = true;

            mNegative = new Hotkey(new[] { negative });
            mPositive = new Hotkey(new[] { postive });

            return true;
        }