//------------------------------------------------------------------------------ // // This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator // version 1.7.0 // from Assets/Scripts/InputActions.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 @InputActions: IInputActionCollection2, IDisposable { public InputActionAsset asset { get; } public @InputActions() { asset = InputActionAsset.FromJson(@"{ ""name"": ""InputActions"", ""maps"": [ { ""name"": ""Player"", ""id"": ""a9631db6-afdf-47e4-a8a3-d63ab06f361c"", ""actions"": [ { ""name"": ""Movement"", ""type"": ""Value"", ""id"": ""bc1a3c6a-5454-4e22-a4c4-e507bd5ef719"", ""expectedControlType"": ""Vector2"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": true }, { ""name"": ""Fire"", ""type"": ""Button"", ""id"": ""15426cef-f42f-45e2-96a3-be5ccf4f7c77"", ""expectedControlType"": ""Button"", ""processors"": """", ""interactions"": """", ""initialStateCheck"": false } ], ""bindings"": [ { ""name"": ""2D Vector"", ""id"": ""ec20865d-29b5-4923-a398-026e3b6a452a"", ""path"": ""2DVector"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""ec9e58f5-3e87-4b8e-98a0-d6f57dee5a62"", ""path"": ""/upArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""6833e932-d60c-49ad-84eb-2f63e3847d53"", ""path"": ""/downArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""aee692a9-6d5f-4fea-b555-8dc6c147efbd"", ""path"": ""/leftArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""ba2ffdd7-4da3-4b20-9b49-14448c0a8a15"", ""path"": ""/rightArrow"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""2D Vector"", ""id"": ""2bc3f525-a5a8-4d0f-a679-5b0d8dcff168"", ""path"": ""2DVector"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": true, ""isPartOfComposite"": false }, { ""name"": ""up"", ""id"": ""a7ed1fe9-4819-4055-840d-284172ef0cba"", ""path"": ""/leftStick/up"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""down"", ""id"": ""f1b7a29e-55b7-4a22-b2db-fceee993e456"", ""path"": ""/leftStick/down"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""left"", ""id"": ""e1be144e-9344-47d0-ad6a-4160bb893bcb"", ""path"": ""/leftStick/left"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": ""right"", ""id"": ""150c31e4-d3d8-4d14-9f07-3185561a86ba"", ""path"": ""/leftStick/right"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Movement"", ""isComposite"": false, ""isPartOfComposite"": true }, { ""name"": """", ""id"": ""0b8928e8-bac0-49e9-b1bf-c272e35f6f52"", ""path"": ""/space"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Fire"", ""isComposite"": false, ""isPartOfComposite"": false }, { ""name"": """", ""id"": ""14e658e7-227f-47f6-94ad-fc988b635cb1"", ""path"": ""/buttonSouth"", ""interactions"": """", ""processors"": """", ""groups"": """", ""action"": ""Fire"", ""isComposite"": false, ""isPartOfComposite"": false } ] } ], ""controlSchemes"": [] }"); // Player m_Player = asset.FindActionMap("Player", throwIfNotFound: true); m_Player_Movement = m_Player.FindAction("Movement", throwIfNotFound: true); m_Player_Fire = m_Player.FindAction("Fire", 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_Movement; private readonly InputAction m_Player_Fire; public struct PlayerActions { private @InputActions m_Wrapper; public PlayerActions(@InputActions wrapper) { m_Wrapper = wrapper; } public InputAction @Movement => m_Wrapper.m_Player_Movement; public InputAction @Fire => m_Wrapper.m_Player_Fire; 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); @Movement.started += instance.OnMovement; @Movement.performed += instance.OnMovement; @Movement.canceled += instance.OnMovement; @Fire.started += instance.OnFire; @Fire.performed += instance.OnFire; @Fire.canceled += instance.OnFire; } private void UnregisterCallbacks(IPlayerActions instance) { @Movement.started -= instance.OnMovement; @Movement.performed -= instance.OnMovement; @Movement.canceled -= instance.OnMovement; @Fire.started -= instance.OnFire; @Fire.performed -= instance.OnFire; @Fire.canceled -= instance.OnFire; } 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 OnMovement(InputAction.CallbackContext context); void OnFire(InputAction.CallbackContext context); } }