示例#1
0
        /// <summary>
        /// Updates the keyboard state and fires any necessary binding events.
        /// </summary>
        /// <param name="time">The GameTime object from the XNA framework.</param>
        public virtual void Update(GameTime time)
        {
            KeyboardState keystate = Keyboard.GetState();
            MouseState    mState   = Mouse.GetState();

            _Binds.ForEach(ForEachUpdate, keystate, mState, null);
            _ScrollValue = mState.ScrollWheelValue;
        }
示例#2
0
 /// <summary>
 /// Fires the input recieved event.
 /// </summary>
 /// <param name="bind">The key binding who's state has changed.</param>
 protected virtual void OnInput(Bind bind)
 {
     if (InputRecieved != null)
     {
         InputRecieved(bind);
     }
     _Screens.ForEach(ForEachInput, bind, null, null);
 }