Project-Sandbox/Assets/Input/PlayerControls.cs

419 lines
16 KiB
C#

// GENERATED AUTOMATICALLY FROM 'Assets/Input/PlayerControls.inputactions'
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public class @PlayerControls : IInputActionCollection, IDisposable
{
public InputActionAsset asset { get; }
public @PlayerControls()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""PlayerControls"",
""maps"": [
{
""name"": ""Gameplay"",
""id"": ""5d541da2-8407-491f-a554-34eed5683cbf"",
""actions"": [
{
""name"": ""Move"",
""type"": ""PassThrough"",
""id"": ""176b5378-76bb-4a9a-b220-0cf716e618ce"",
""expectedControlType"": """",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Jump"",
""type"": ""Button"",
""id"": ""0e4d534b-a725-4b9c-80ad-a657cec04a8a"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Look"",
""type"": ""Button"",
""id"": ""1769d1d9-6996-4cac-8248-19ddf9ffa46e"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
},
{
""name"": ""Pause"",
""type"": ""Button"",
""id"": ""9245a8ae-c817-4f60-9b78-f639dd4a52f0"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """"
}
],
""bindings"": [
{
""name"": ""WASD"",
""id"": ""af1c1446-133f-4220-8718-ac63313ce010"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""f1720972-4a04-4bcf-b96f-fe0845ed9ed2"",
""path"": ""<Keyboard>/w"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard and Mouse"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""43e9776a-fcae-48fd-9ed5-af1b0745f82b"",
""path"": ""<Keyboard>/s"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard and Mouse"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""08b284f6-a56f-4584-894b-d26470ce5d03"",
""path"": ""<Keyboard>/a"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard and Mouse"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""5a94bfd0-5ef4-4bad-a7e5-10330c4e50fd"",
""path"": ""<Keyboard>/d"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard and Mouse"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""Left Stick"",
""id"": ""88171fd5-c7ad-4669-b31a-59c734a98f77"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Move"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""a07fde90-0b40-42a9-96f3-df7896f30223"",
""path"": ""<Gamepad>/leftStick/up"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""01beeb9f-62e7-4ea1-bf4d-9e6c9b2226df"",
""path"": ""<Gamepad>/leftStick/down"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""c8ea7a39-dbfa-4614-ab6f-60d9b3bcb786"",
""path"": ""<Gamepad>/leftStick/left"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""05c62b9e-e87b-4f7b-b200-257fc9593d48"",
""path"": ""<Gamepad>/leftStick/right"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Move"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""a67cf1da-5e2a-4878-b452-e7372daab939"",
""path"": ""<Keyboard>/space"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard and Mouse"",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""debcc072-c2da-4503-b511-9ab019e55e1a"",
""path"": ""<Gamepad>/buttonEast"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Jump"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": ""Right Stick"",
""id"": ""35ad6eba-4737-4f44-a5b3-d6709bfaf303"",
""path"": ""2DVector"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""Look"",
""isComposite"": true,
""isPartOfComposite"": false
},
{
""name"": ""up"",
""id"": ""189a746a-e4c6-4b4a-b9cc-de06067eb341"",
""path"": ""<Gamepad>/rightStick/up"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Look"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""down"",
""id"": ""c8952c61-21f1-4d54-9314-26a9c5338aa5"",
""path"": ""<Gamepad>/rightStick/down"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Look"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""left"",
""id"": ""aa0a5e3c-6e1d-4cda-a875-39e369d699ee"",
""path"": ""<Gamepad>/rightStick/left"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Look"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": ""right"",
""id"": ""fd3d2415-15f2-488d-b055-365ee2afc166"",
""path"": ""<Gamepad>/rightStick/right"",
""interactions"": """",
""processors"": """",
""groups"": ""Gamepad"",
""action"": ""Look"",
""isComposite"": false,
""isPartOfComposite"": true
},
{
""name"": """",
""id"": ""5fe61161-b433-47e3-b01b-f299068b92ae"",
""path"": ""<Keyboard>/escape"",
""interactions"": """",
""processors"": """",
""groups"": ""Keyboard and Mouse"",
""action"": ""Pause"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": [
{
""name"": ""Keyboard and Mouse"",
""bindingGroup"": ""Keyboard and Mouse"",
""devices"": [
{
""devicePath"": ""<Keyboard>"",
""isOptional"": false,
""isOR"": false
},
{
""devicePath"": ""<Mouse>"",
""isOptional"": false,
""isOR"": false
}
]
},
{
""name"": ""Gamepad"",
""bindingGroup"": ""Gamepad"",
""devices"": [
{
""devicePath"": ""<Gamepad>"",
""isOptional"": false,
""isOR"": false
}
]
}
]
}");
// Gameplay
m_Gameplay = asset.FindActionMap("Gameplay", throwIfNotFound: true);
m_Gameplay_Move = m_Gameplay.FindAction("Move", throwIfNotFound: true);
m_Gameplay_Jump = m_Gameplay.FindAction("Jump", throwIfNotFound: true);
m_Gameplay_Look = m_Gameplay.FindAction("Look", throwIfNotFound: true);
m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true);
}
public void Dispose()
{
UnityEngine.Object.Destroy(asset);
}
public InputBinding? bindingMask
{
get => asset.bindingMask;
set => asset.bindingMask = value;
}
public ReadOnlyArray<InputDevice>? devices
{
get => asset.devices;
set => asset.devices = value;
}
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
public bool Contains(InputAction action)
{
return asset.Contains(action);
}
public IEnumerator<InputAction> GetEnumerator()
{
return asset.GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
public void Enable()
{
asset.Enable();
}
public void Disable()
{
asset.Disable();
}
// Gameplay
private readonly InputActionMap m_Gameplay;
private IGameplayActions m_GameplayActionsCallbackInterface;
private readonly InputAction m_Gameplay_Move;
private readonly InputAction m_Gameplay_Jump;
private readonly InputAction m_Gameplay_Look;
private readonly InputAction m_Gameplay_Pause;
public struct GameplayActions
{
private @PlayerControls m_Wrapper;
public GameplayActions(@PlayerControls wrapper) { m_Wrapper = wrapper; }
public InputAction @Move => m_Wrapper.m_Gameplay_Move;
public InputAction @Jump => m_Wrapper.m_Gameplay_Jump;
public InputAction @Look => m_Wrapper.m_Gameplay_Look;
public InputAction @Pause => m_Wrapper.m_Gameplay_Pause;
public InputActionMap Get() { return m_Wrapper.m_Gameplay; }
public void Enable() { Get().Enable(); }
public void Disable() { Get().Disable(); }
public bool enabled => Get().enabled;
public static implicit operator InputActionMap(GameplayActions set) { return set.Get(); }
public void SetCallbacks(IGameplayActions instance)
{
if (m_Wrapper.m_GameplayActionsCallbackInterface != null)
{
@Move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@Move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@Move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@Jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@Jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@Jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@Look.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook;
@Look.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook;
@Look.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook;
@Pause.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
@Pause.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
@Pause.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnPause;
}
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
if (instance != null)
{
@Move.started += instance.OnMove;
@Move.performed += instance.OnMove;
@Move.canceled += instance.OnMove;
@Jump.started += instance.OnJump;
@Jump.performed += instance.OnJump;
@Jump.canceled += instance.OnJump;
@Look.started += instance.OnLook;
@Look.performed += instance.OnLook;
@Look.canceled += instance.OnLook;
@Pause.started += instance.OnPause;
@Pause.performed += instance.OnPause;
@Pause.canceled += instance.OnPause;
}
}
}
public GameplayActions @Gameplay => new GameplayActions(this);
private int m_KeyboardandMouseSchemeIndex = -1;
public InputControlScheme KeyboardandMouseScheme
{
get
{
if (m_KeyboardandMouseSchemeIndex == -1) m_KeyboardandMouseSchemeIndex = asset.FindControlSchemeIndex("Keyboard and Mouse");
return asset.controlSchemes[m_KeyboardandMouseSchemeIndex];
}
}
private int m_GamepadSchemeIndex = -1;
public InputControlScheme GamepadScheme
{
get
{
if (m_GamepadSchemeIndex == -1) m_GamepadSchemeIndex = asset.FindControlSchemeIndex("Gamepad");
return asset.controlSchemes[m_GamepadSchemeIndex];
}
}
public interface IGameplayActions
{
void OnMove(InputAction.CallbackContext context);
void OnJump(InputAction.CallbackContext context);
void OnLook(InputAction.CallbackContext context);
void OnPause(InputAction.CallbackContext context);
}
}