//------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // version 1.7.0 // from Assets/Actions/PlayerActions.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 @PlayerActions: IInputActionCollection2, IDisposable { public InputActionAsset asset { get; } public @PlayerActions() { asset = InputActionAsset.FromJson(@"{ ""name"": ""PlayerActions"", ""maps"": [ { ""name"": ""Movement"", ""id"": ""e2eb14cb-f16d-48c8-b678-1e5f743f79fb"", ""actions"": [ { ""name"": ""Move"", ""type"": ""Value"", ""id"": ""8ecefed7-25f8-40a4-b283-432e2c36106f"", ""expectedControlType"": ""Vector2"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true } ], ""bindings"": [ { ""name"": ""2D Vector"", ""id"": ""c0bedd3d-f062-42f8-be5e-d6296bc522f7"", ""path"": ""2DVector"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""d9c4bd98-c52e-4b75-b89b-774831a2e00e"", ""path"": ""/w"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""2014b8f6-0e79-4d7b-8544-3a04ee7b0196"", ""path"": ""/s"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""e3e7462d-3635-462a-8990-ed25ac6d9321"", ""path"": ""/a"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""b4091886-b1e3-40c5-90d6-f80b36df218d"", ""path"": ""/d"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Move"", ""isComposite"": false, ""isPartOfComposite"": true } ] }, { ""name"": ""Attack"", ""id"": ""1585cfeb-41f2-44d3-b1a1-78a860fbadbb"", ""actions"": [ { ""name"": ""ClickAttack"", ""type"": ""Button"", ""id"": ""af8d1e10-86ff-4117-8584-3ca8c8d20819"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false } ], ""bindings"": [ { ""name"": """", ""id"": ""b770f9e8-697b-4c0a-8dfd-fcd81aca8721"", ""path"": ""/space"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""ClickAttack"", ""isComposite"": false, ""isPartOfComposite"": false } ] }, { ""name"": ""Dialogue"", ""id"": ""0a2eda12-8a1c-4db5-a39a-78fe4de594f5"", ""actions"": [ { ""name"": ""Interact"", ""type"": ""Button"", ""id"": ""263f6a4a-2e51-4792-8798-43efcc8a0f28"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false }, { ""name"": ""Continue"", ""type"": ""Button"", ""id"": ""2a108daa-9156-4b14-905d-5a1ced29204a"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false } ], ""bindings"": [ { ""name"": """", ""id"": ""5f6b363d-dac3-4241-ab3d-8d0a3ba46133"", ""path"": ""/e"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Interact"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""b2e352da-1b6c-4073-8919-566f71516a68"", ""path"": ""/enter"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Continue"", ""isComposite"": false, ""isPartOfComposite"": false } ] } ], ""controlSchemes"": [] }"); // Movement m_Movement = asset.FindActionMap("Movement", throwIfNotFound: true); m_Movement_Move = m_Movement.FindAction("Move", throwIfNotFound: true); // Attack m_Attack = asset.FindActionMap("Attack", throwIfNotFound: true); m_Attack_ClickAttack = m_Attack.FindAction("ClickAttack", throwIfNotFound: true); // Dialogue m_Dialogue = asset.FindActionMap("Dialogue", throwIfNotFound: true); m_Dialogue_Interact = m_Dialogue.FindAction("Interact", throwIfNotFound: true); m_Dialogue_Continue = m_Dialogue.FindAction("Continue", 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); } // Movement private readonly InputActionMap m_Movement; private List m_MovementActionsCallbackInterfaces = new List(); private readonly InputAction m_Movement_Move; public struct MovementActions { private @PlayerActions m_Wrapper; public MovementActions(@PlayerActions wrapper) { m_Wrapper = wrapper; } public InputAction @Move => m_Wrapper.m_Movement_Move; public InputActionMap Get() { return m_Wrapper.m_Movement; } public void Enable() { Get().Enable(); } public void Disable() { Get().Disable(); } public bool enabled => Get().enabled; public static implicit operator InputActionMap(MovementActions set) { return set.Get(); } public void AddCallbacks(IMovementActions instance) { if (instance == null || m_Wrapper.m_MovementActionsCallbackInterfaces.Contains(instance)) return; m_Wrapper.m_MovementActionsCallbackInterfaces.Add(instance); @Move.started += instance.OnMove; @Move.performed += instance.OnMove; @Move.canceled += instance.OnMove; } private void UnregisterCallbacks(IMovementActions instance) { @Move.started -= instance.OnMove; @Move.performed -= instance.OnMove; @Move.canceled -= instance.OnMove; } public void RemoveCallbacks(IMovementActions instance) { if (m_Wrapper.m_MovementActionsCallbackInterfaces.Remove(instance)) UnregisterCallbacks(instance); } public void SetCallbacks(IMovementActions instance) { foreach (var item in m_Wrapper.m_MovementActionsCallbackInterfaces) UnregisterCallbacks(item); m_Wrapper.m_MovementActionsCallbackInterfaces.Clear(); AddCallbacks(instance); } } public MovementActions @Movement => new MovementActions(this); // Attack private readonly InputActionMap m_Attack; private List m_AttackActionsCallbackInterfaces = new List(); private readonly InputAction m_Attack_ClickAttack; public struct AttackActions { private @PlayerActions m_Wrapper; public AttackActions(@PlayerActions wrapper) { m_Wrapper = wrapper; } public InputAction @ClickAttack => m_Wrapper.m_Attack_ClickAttack; public InputActionMap Get() { return m_Wrapper.m_Attack; } public void Enable() { Get().Enable(); } public void Disable() { Get().Disable(); } public bool enabled => Get().enabled; public static implicit operator InputActionMap(AttackActions set) { return set.Get(); } public void AddCallbacks(IAttackActions instance) { if (instance == null || m_Wrapper.m_AttackActionsCallbackInterfaces.Contains(instance)) return; m_Wrapper.m_AttackActionsCallbackInterfaces.Add(instance); @ClickAttack.started += instance.OnClickAttack; @ClickAttack.performed += instance.OnClickAttack; @ClickAttack.canceled += instance.OnClickAttack; } private void UnregisterCallbacks(IAttackActions instance) { @ClickAttack.started -= instance.OnClickAttack; @ClickAttack.performed -= instance.OnClickAttack; @ClickAttack.canceled -= instance.OnClickAttack; } public void RemoveCallbacks(IAttackActions instance) { if (m_Wrapper.m_AttackActionsCallbackInterfaces.Remove(instance)) UnregisterCallbacks(instance); } public void SetCallbacks(IAttackActions instance) { foreach (var item in m_Wrapper.m_AttackActionsCallbackInterfaces) UnregisterCallbacks(item); m_Wrapper.m_AttackActionsCallbackInterfaces.Clear(); AddCallbacks(instance); } } public AttackActions @Attack => new AttackActions(this); // Dialogue private readonly InputActionMap m_Dialogue; private List m_DialogueActionsCallbackInterfaces = new List(); private readonly InputAction m_Dialogue_Interact; private readonly InputAction m_Dialogue_Continue; public struct DialogueActions { private @PlayerActions m_Wrapper; public DialogueActions(@PlayerActions wrapper) { m_Wrapper = wrapper; } public InputAction @Interact => m_Wrapper.m_Dialogue_Interact; public InputAction @Continue => m_Wrapper.m_Dialogue_Continue; public InputActionMap Get() { return m_Wrapper.m_Dialogue; } public void Enable() { Get().Enable(); } public void Disable() { Get().Disable(); } public bool enabled => Get().enabled; public static implicit operator InputActionMap(DialogueActions set) { return set.Get(); } public void AddCallbacks(IDialogueActions instance) { if (instance == null || m_Wrapper.m_DialogueActionsCallbackInterfaces.Contains(instance)) return; m_Wrapper.m_DialogueActionsCallbackInterfaces.Add(instance); @Interact.started += instance.OnInteract; @Interact.performed += instance.OnInteract; @Interact.canceled += instance.OnInteract; @Continue.started += instance.OnContinue; @Continue.performed += instance.OnContinue; @Continue.canceled += instance.OnContinue; } private void UnregisterCallbacks(IDialogueActions instance) { @Interact.started -= instance.OnInteract; @Interact.performed -= instance.OnInteract; @Interact.canceled -= instance.OnInteract; @Continue.started -= instance.OnContinue; @Continue.performed -= instance.OnContinue; @Continue.canceled -= instance.OnContinue; } public void RemoveCallbacks(IDialogueActions instance) { if (m_Wrapper.m_DialogueActionsCallbackInterfaces.Remove(instance)) UnregisterCallbacks(instance); } public void SetCallbacks(IDialogueActions instance) { foreach (var item in m_Wrapper.m_DialogueActionsCallbackInterfaces) UnregisterCallbacks(item); m_Wrapper.m_DialogueActionsCallbackInterfaces.Clear(); AddCallbacks(instance); } } public DialogueActions @Dialogue => new DialogueActions(this); public interface IMovementActions { void OnMove(InputAction.CallbackContext context); } public interface IAttackActions { void OnClickAttack(InputAction.CallbackContext context); } public interface IDialogueActions { void OnInteract(InputAction.CallbackContext context); void OnContinue(InputAction.CallbackContext context); } }