예제 #1
0
        public static void Initialize()
        {
            ButtonStates = new BMouseClickInfo[15];
            for (int i = 0; i < ButtonStates.Length; i++)
            {
                ButtonStates[i] = new BMouseClickInfo();
            }

            MouseLocation = Vector2.Zero;
        }
예제 #2
0
        public static BMouseClickInfo GetButtonStateNow(BMouseButton button)
        {
            BMouseClickInfo result = new BMouseClickInfo()
            {
                IsPressed = ButtonStates[(int)button].IsPressed, Location = ButtonStates[(int)button].Location
            };

            if (result.IsPressed)
            {
                ButtonStates[(int)button].IsPressed = false;
                return(result);
            }
            else
            {
                return(result);
            }
        }