Exemplo n.º 1
0
        /// <summary>
        /// Create a new PlayerInput instance. Monitors the input for a specified player.
        /// </summary>
        /// <param name="pIndex">Specified Player Index</param>
        public PlayerInput(PlayerIndex pIndex)
            : base(G.Game)
        {
            playerIndex = pIndex;
            actionsPressed = new Dictionary<string, Function>();
            actionsReleased = new Dictionary<string, Function>();
            actionsHeld = new Dictionary<string, Function>();
            keyboard = new KeyboardInput(pIndex);
            controller = new ControllerInput(pIndex);

            G.Game.Components.Add(this);
        }