public InputHandler(Game game, bool allowsExiting)
            : base(game)
        {
            this.allowsExiting = allowsExiting;

            //Add IInputHandler as Game Service the constructor of this class added the class as a service
            game.Services.AddService(typeof(IInputHandler), this);

            //initialize our local member fields
            keyboard = new KeyboardHandler();

#if !XBOX360
            Game.IsMouseVisible = true;
            prevMouseState = Mouse.GetState();
#endif
        }
Ejemplo n.º 2
0
        public InputHandler(Game game, bool allowsExiting)
            : base(game)
        {
            this.allowsExiting = allowsExiting;

            //Add IInputHandler as Game Service the constructor of this class added the class as a service
            game.Services.AddService(typeof(IInputHandler), this);

            //initialize our local member fields
            keyboard = new KeyboardHandler();

#if !XBOX360
            Game.IsMouseVisible = true;
            prevMouseState      = Mouse.GetState();
#endif
        }