Exemplo n.º 1
0
        public InputHandler(Game game, bool allowsExiting = false)
            : base(game)
        {
            this.allowsExiting = allowsExiting;

            this.keyboard = new KeyboardHandler();
            this.gamePadHandler = new GamePadHandler();

            prevMouseState = Mouse.GetState();
            mouseState = prevMouseState;

            game.Services.AddService<IInputHandler>(this);                
        }
Exemplo n.º 2
0
 public Vector2 GetStick(int playerIndex, GamePadHandler.GamePadSticks stick)
 {
     return gamePadHandler.GetStick(playerIndex, stick);
 }