Наследование: I2DInput, I1DInput
Пример #1
0
        public I1DInput Get1DInput(Keys negative, Keys positive)
        {
            var toReturn = new DirectionalKeyGroup();

            toReturn.LeftKey  = negative;
            toReturn.RightKey = positive;

            return(toReturn);
        }
Пример #2
0
        /// <summary>
        /// Returns an instance of I2DInput which can be used to read 2D input using the four
        /// argument keys.
        /// </summary>
        /// <param name="left">The key to use for the left direction.</param>
        /// <param name="right">The key to use for the right direction.</param>
        /// <param name="up">The key to use for the up direction.</param>
        /// <param name="down">The key to use for the down direction.</param>
        /// <returns>The I2DInput instance which can be used to read input.</returns>
        public I2DInput Get2DInput(Keys left, Keys right, Keys up, Keys down)
        {
            var toReturn = new DirectionalKeyGroup();

            toReturn.LeftKey  = left;
            toReturn.RightKey = right;
            toReturn.UpKey    = up;
            toReturn.DownKey  = down;

            return(toReturn);
        }