private void LoadAll(InputManager target)
    {
        InputManagerSaveManager.Load();

        target.gpDeadSpace = InputManager.GamepadDeadSpace;

        if (InputManager.Keyboard != null)
        {
            target.keyboard.LeftInputs        = new List <KeyCode>(InputManager.Keyboard.LeftInputs);
            target.keyboard.RightInputs       = new List <KeyCode>(InputManager.Keyboard.RightInputs);
            target.keyboard.UpInputs          = new List <KeyCode>(InputManager.Keyboard.UpInputs);
            target.keyboard.DownInputs        = new List <KeyCode>(InputManager.Keyboard.DownInputs);
            target.keyboard.CrouchInputs      = new List <KeyCode>(InputManager.Keyboard.CrouchInputs);
            target.keyboard.SprintInputs      = new List <KeyCode>(InputManager.Keyboard.SprintInputs);
            target.keyboard.InteractionInputs = new List <KeyCode>(InputManager.Keyboard.InteractionInputs);
        }

        if (InputManager.Gamepad != null)
        {
            target.gamepad.CrouchInputs      = new List <GamepadButtons>(InputManager.Gamepad.CrouchInputs);
            target.gamepad.SprintInputs      = new List <GamepadButtons>(InputManager.Gamepad.SprintInputs);
            target.gamepad.InteractionInputs = new List <GamepadButtons>(InputManager.Gamepad.InteractionInputs);
        }
    }
示例#2
0
 private void Awake()
 {
     InputManagerSaveManager.Load();
 }