//------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // version 1.5.0 // from Assets/PlayerInputActions.inputactions // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ using System; using System.Collections; using System.Collections.Generic; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Utilities; public partial class @PlayerInputActions: IInputActionCollection2, IDisposable { public InputActionAsset asset { get; } public @PlayerInputActions() { asset = InputActionAsset.FromJson(@"{ ""name"": ""PlayerInputActions"", ""maps"": [ { ""name"": ""Player"", ""id"": ""f8e0b637-f75b-461a-9bb5-2d30dff139f5"", ""actions"": [ { ""name"": ""Move"", ""type"": ""Value"", ""id"": ""cbd84e00-2ff4-4f1a-aba7-e70ef32df0dd"", ""expectedControlType"": ""Vector2"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true }, { ""name"": ""Interact"", ""type"": ""Button"", ""id"": ""6d76184b-c071-44cb-b813-020b6a80a5eb"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""InteractAlternate"", ""type"": ""Button"", ""id"": ""7e915c9c-d428-4512-842f-51583bb5c901"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""Pause"", ""type"": ""Button"", ""id"": ""d9b22910-f1ca-4aac-8dd2-4e8bd2fed7fe"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false } ], ""bindings"": [ { ""name"": ""WASD"", ""id"": ""88272aa4-9de4-4969-bf34-a8cf0ed36447"", ""path"": ""2DVector"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""79392300-286e-4514-9d4d-80dcf0228dde"", ""path"": ""/w"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""2b3f2378-274e-4c40-a504-6f8a9acecee6"", ""path"": ""/s"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""fe756558-4d52-48da-8920-d4d0cda44f93"", ""path"": ""/a"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""fdfbd92c-6699-4560-a60e-bd40d65c4130"", ""path"": ""/d"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""Arrow Keys"", ""id"": ""41067e1b-7556-4806-b090-a0effd225b25"", ""path"": ""2DVector"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""2146b330-9195-4396-bb39-b9d574a68718"", ""path"": ""/upArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""29b9100c-545c-46dc-8cc9-b3f55a3391b1"", ""path"": ""/downArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""762a00f5-8219-453d-bbd2-1e71cc737423"", ""path"": ""/leftArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""c94bdf9b-0335-4ec6-ab19-22116bd0be8f"", ""path"": ""/rightArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": """", ""id"": ""545341dc-a1a1-47e8-a08d-84a68957f048"", ""path"": ""/leftStick"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""748d47d0-26ed-4681-b4e6-444c65489c76"", ""path"": ""/e"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Interact"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""f3791e57-b19a-4a65-ba91-e9f4484e7581"", ""path"": ""/buttonWest"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Interact"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""e6b7cd58-527a-4f05-ac6c-837c045588fc"", ""path"": ""/f"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""InteractAlternate"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""915cd8bb-a4cc-4a75-b7ee-327c965ac8c2"", ""path"": ""/buttonSouth"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""InteractAlternate"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""5ad26ffd-8906-4a7b-b3ea-0c60670706ee"", ""path"": ""/escape"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Pause"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""9da1a7a9-629a-4f0b-8fd4-1f835ecd46e6"", ""path"": ""/start"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Pause"", ""isComposite"": false, ""isPartOfComposite"": false } ] } ], ""controlSchemes"": [] }"); // Player m_Player = asset.FindActionMap("Player", throwIfNotFound: true); m_Player_Move = m_Player.FindAction("Move", throwIfNotFound: true); m_Player_Interact = m_Player.FindAction("Interact", throwIfNotFound: true); m_Player_InteractAlternate = m_Player.FindAction("InteractAlternate", throwIfNotFound: true); m_Player_Pause = m_Player.FindAction("Pause", throwIfNotFound: true); } public void Dispose() { UnityEngine.Object.Destroy(asset); } public InputBinding? bindingMask { get => asset.bindingMask; set => asset.bindingMask = value; } public ReadOnlyArray? devices { get => asset.devices; set => asset.devices = value; } public ReadOnlyArray controlSchemes => asset.controlSchemes; public bool Contains(InputAction action) { return asset.Contains(action); } public IEnumerator GetEnumerator() { return asset.GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } public void Enable() { asset.Enable(); } public void Disable() { asset.Disable(); } public IEnumerable bindings => asset.bindings; public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false) { return asset.FindAction(actionNameOrId, throwIfNotFound); } public int FindBinding(InputBinding bindingMask, out InputAction action) { return asset.FindBinding(bindingMask, out action); } // Player private readonly InputActionMap m_Player; private List m_PlayerActionsCallbackInterfaces = new List(); private readonly InputAction m_Player_Move; private readonly InputAction m_Player_Interact; private readonly InputAction m_Player_InteractAlternate; private readonly InputAction m_Player_Pause; public struct PlayerActions { private @PlayerInputActions m_Wrapper; public PlayerActions(@PlayerInputActions wrapper) { m_Wrapper = wrapper; } public InputAction @Move => m_Wrapper.m_Player_Move; public InputAction @Interact => m_Wrapper.m_Player_Interact; public InputAction @InteractAlternate => m_Wrapper.m_Player_InteractAlternate; public InputAction @Pause => m_Wrapper.m_Player_Pause; public InputActionMap Get() { return m_Wrapper.m_Player; } public void Enable() { Get().Enable(); } public void Disable() { Get().Disable(); } public bool enabled => Get().enabled; public static implicit operator InputActionMap(PlayerActions set) { return set.Get(); } public void AddCallbacks(IPlayerActions instance) { if (instance == null || m_Wrapper.m_PlayerActionsCallbackInterfaces.Contains(instance)) return; m_Wrapper.m_PlayerActionsCallbackInterfaces.Add(instance); @Move.started += instance.OnMove; @Move.performed += instance.OnMove; @Move.canceled += instance.OnMove; @Interact.started += instance.OnInteract; @Interact.performed += instance.OnInteract; @Interact.canceled += instance.OnInteract; @InteractAlternate.started += instance.OnInteractAlternate; @InteractAlternate.performed += instance.OnInteractAlternate; @InteractAlternate.canceled += instance.OnInteractAlternate; @Pause.started += instance.OnPause; @Pause.performed += instance.OnPause; @Pause.canceled += instance.OnPause; } private void UnregisterCallbacks(IPlayerActions instance) { @Move.started -= instance.OnMove; @Move.performed -= instance.OnMove; @Move.canceled -= instance.OnMove; @Interact.started -= instance.OnInteract; @Interact.performed -= instance.OnInteract; @Interact.canceled -= instance.OnInteract; @InteractAlternate.started -= instance.OnInteractAlternate; @InteractAlternate.performed -= instance.OnInteractAlternate; @InteractAlternate.canceled -= instance.OnInteractAlternate; @Pause.started -= instance.OnPause; @Pause.performed -= instance.OnPause; @Pause.canceled -= instance.OnPause; } public void RemoveCallbacks(IPlayerActions instance) { if (m_Wrapper.m_PlayerActionsCallbackInterfaces.Remove(instance)) UnregisterCallbacks(instance); } public void SetCallbacks(IPlayerActions instance) { foreach (var item in m_Wrapper.m_PlayerActionsCallbackInterfaces) UnregisterCallbacks(item); m_Wrapper.m_PlayerActionsCallbackInterfaces.Clear(); AddCallbacks(instance); } } public PlayerActions @Player => new PlayerActions(this); public interface IPlayerActions { void OnMove(InputAction.CallbackContext context); void OnInteract(InputAction.CallbackContext context); void OnInteractAlternate(InputAction.CallbackContext context); void OnPause(InputAction.CallbackContext context); } }