Exemple #1
0
        void SetupInput()
        {
            InputManager inputManager = new InputManager();
            GamePadInputDeviceManager gamePadInputDeviceManager = new GamePadInputDeviceManager();

            inputManager.Setup();
            inputManager.AddDeviceManager(gamePadInputDeviceManager);

            registerGlobalManager(inputManager);
        }
Exemple #2
0
        public static Guid GetPlayerDeviceGuid(PlayerIndex playerIndex)
        {
            Guid deviceGuid = Guid.Empty;

            GamePadInputDeviceManager deviceManager = GetDeviceManager <GamePadInputDeviceManager>();

            if (deviceManager != null)
            {
                deviceGuid = deviceManager.GetPlayerInputDeviceGuid(playerIndex);
            }

            Console.WriteLine($"{deviceGuid} Device GUID found for Player Index {playerIndex.ToString()}");

            return(deviceGuid);
        }
Exemple #3
0
        private (PlayerActionSet playerActionSetOne, PlayerActionSet playerActionSetTwo) SetupInput()
        {
            InputManager inputManager = new InputManager();
            GamePadInputDeviceManager gamePadInputDeviceManager = new GamePadInputDeviceManager();

            inputManager.Setup();
            inputManager.AddDeviceManager(gamePadInputDeviceManager);

            var playerActionSetOne = new PlayerActionSet();

            playerActionSetOne.SetupDefaultBindings();
            playerActionSetOne.SetupDefaultKeebBindings();
//            playerActionSetOne.Device = InputManager.devices[(int)PlayerIndex.One];
//
            var playerActionSetTwo = new PlayerActionSet();

//            playerActionSetTwo.Device = InputManager.devices[(int)PlayerIndex.Two];



            registerGlobalManager(inputManager);

            return(playerActionSetOne, playerActionSetTwo);
        }