示例#1
0
        internal static void Update()
        {
            OldKeyboard = Keyboard;
            OldMouse = Mouse;

            Keyboard = KeyHandler.GetState();
            Mouse = MouseHandler.GetState();
        }
示例#2
0
        internal static void Update()
        {
            OldKeyboard = Keyboard;
            OldMouse    = Mouse;

            Keyboard = KeyHandler.GetState();
            Mouse    = MouseHandler.GetState();
        }
示例#3
0
        /// <summary>
        /// Retrieves the current mouse state
        /// </summary>
        /// <returns>The current mouse state</returns>
        public static MouseHandler GetState()
        {
            XnaExtMouse xem = XnaExtMouse.GetState();

            MouseHandler ret = new MouseHandler()
            {
                l        = xem.Left,
                Right    = xem.Right,
                Middle   = xem.Middle,
                XButton1 = xem.XButton1,
                XButton2 = xem.XButton2
            };

            ret.Position    = xem.Position;
            ret.ScrollWheel = xem.ScrollWheel;

            return(ret);
        }
示例#4
0
        /// <summary>
        /// Retrieves the current mouse state
        /// </summary>
        /// <returns>The current mouse state</returns>
        public static MouseHandler GetState()
        {
            XnaExtMouse xem = XnaExtMouse.GetState();

            MouseHandler ret = new MouseHandler()
            {
                l = xem.Left,
                Right = xem.Right,
                Middle = xem.Middle,
                XButton1 = xem.XButton1,
                XButton2 = xem.XButton2
            };

            ret.Position = xem.Position;
            ret.ScrollWheel = xem.ScrollWheel;

            return ret;
        }