Esempio n. 1
0
        /// <summary>
        /// Constructor for the Input Component
        /// </summary>
        /// <param name="game">Game to bind to</param>
        public InputManager(Game game)
            : base(game)
        {
            // Set this to Update before everything
            this.UpdateOrder = 0;
            // Create a Keyboard Input Reference
            this.Keyboard = new KeyboardInputComponent(game);

            this.GamePad = new GamepadInputComponent(game);

            // Add as Service
            this.Game.Services.AddService(this.GetType(), this);
        }
Esempio n. 2
0
        /// <summary>
        /// Constructor for the Input Component
        /// </summary>
        /// <param name="game">Game to bind to</param>
        public InputManager(Game game)
            : base(game)
        {
            // Set this to Update before everything
            this.UpdateOrder = 0;
            // Create a Keyboard Input Reference
            this.Keyboard = new KeyboardInputComponent(game);

            this.GamePad = new GamepadInputComponent(game);

            // Add as Service
            this.Game.Services.AddService(this.GetType(), this);
        }