Exemple #1
0
 public PlayerSessionData(int playerIndex, int deviceIndex, PlayerGameplayInputManager charInputManager, UIInputManager uiInputManager)
 {
     this.playerIndex          = playerIndex;
     this.deviceIndex          = deviceIndex;
     this.gameplayInputManager = charInputManager;
     this.uiInputManager       = uiInputManager;
     //playerData = new PlayerData();
 }
Exemple #2
0
        private void InitializeUnusedDevice(InputDevice device, string schemeName)
        {
            int        deviceIndex = userDevices.Count;
            UserDevice userDevice  = new UserDevice(deviceIndex, device, schemeName);

            userDevices.Add(userDevice);
            PlayerGameplayInputManager gameplayInputManager = new PlayerGameplayInputManager(userDevice.gameplayInput);

            gameplayInputManagers.Add(gameplayInputManager);
            UIInputManager uiInputManager = new UIInputManager(userDevice.uiInput);

            playerUIInputManagers.Add(uiInputManager);
            //uDevice.EnableUIInput(true);
            //This should be elsewhere or conditional

            /*SelectScreenPlayerController playerSelectController = new SelectScreenPlayerController(deviceIndex, uiInputManager, this);
             * playerSelectControllers.Add(playerSelectController);*/
            OnDeviceRegistered?.Invoke(userDevice, gameplayInputManager, uiInputManager);
        }
 private void OnDeviceRegistered(UserDevice userDevice, PlayerGameplayInputManager gameplayInputManager, UIInputManager uiInputManager)
 {
     TryToAssignDefaultDevice(userDevice);
 }