Advertisement
Guest User

Untitled

a guest
May 14th, 2022
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 8.32 KB | None | 0 0
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. //     This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
  4. //     version 1.3.0
  5. //     from Assets/Input/PlayerInput.inputactions
  6. //
  7. //     Changes to this file may cause incorrect behavior and will be lost if
  8. //     the code is regenerated.
  9. // </auto-generated>
  10. //------------------------------------------------------------------------------
  11.  
  12. using System;
  13. using System.Collections;
  14. using System.Collections.Generic;
  15. using UnityEngine.InputSystem;
  16. using UnityEngine.InputSystem.Utilities;
  17.  
  18. public partial class @PlayerInput : IInputActionCollection2, IDisposable
  19. {
  20.     public InputActionAsset asset { get; }
  21.     public @PlayerInput()
  22.     {
  23.         asset = InputActionAsset.FromJson(@"{
  24.    ""name"": ""PlayerInput"",
  25.    ""maps"": [
  26.        {
  27.            ""name"": ""onFoot"",
  28.            ""id"": ""b1d17cea-a13a-4d26-bb84-3444f6452b18"",
  29.            ""actions"": [
  30.                {
  31.                    ""name"": ""Movement"",
  32.                    ""type"": ""Value"",
  33.                    ""id"": ""0af62df4-a313-4b1d-bc71-c08d8d68de70"",
  34.                    ""expectedControlType"": ""Vector2"",
  35.                    ""processors"": """",
  36.                    ""interactions"": """",
  37.                    ""initialStateCheck"": true
  38.                },
  39.                {
  40.                    ""name"": ""Jump"",
  41.                    ""type"": ""Button"",
  42.                    ""id"": ""e0f4fdaf-348a-498b-a715-4b90d5cd5575"",
  43.                    ""expectedControlType"": ""Button"",
  44.                    ""processors"": """",
  45.                    ""interactions"": """",
  46.                    ""initialStateCheck"": false
  47.                }
  48.            ],
  49.            ""bindings"": [
  50.                {
  51.                    ""name"": ""WASD"",
  52.                    ""id"": ""626c081b-e6a9-401b-964c-1f76d3c9f3dc"",
  53.                    ""path"": ""2DVector"",
  54.                    ""interactions"": """",
  55.                    ""processors"": """",
  56.                    ""groups"": """",
  57.                    ""action"": ""Movement"",
  58.                    ""isComposite"": true,
  59.                    ""isPartOfComposite"": false
  60.                },
  61.                {
  62.                    ""name"": ""up"",
  63.                    ""id"": ""d352314e-7bf4-4178-b5bb-4c88a529d2dc"",
  64.                    ""path"": ""<Keyboard>/w"",
  65.                    ""interactions"": """",
  66.                    ""processors"": """",
  67.                    ""groups"": """",
  68.                    ""action"": ""Movement"",
  69.                    ""isComposite"": false,
  70.                    ""isPartOfComposite"": true
  71.                },
  72.                {
  73.                    ""name"": ""down"",
  74.                    ""id"": ""29891aec-0ed4-4c5a-bfb1-24a6ce0d1213"",
  75.                    ""path"": ""<Keyboard>/s"",
  76.                    ""interactions"": """",
  77.                    ""processors"": """",
  78.                    ""groups"": """",
  79.                    ""action"": ""Movement"",
  80.                    ""isComposite"": false,
  81.                    ""isPartOfComposite"": true
  82.                },
  83.                {
  84.                    ""name"": ""left"",
  85.                    ""id"": ""27700b56-0e75-49e9-b8ef-5b1725fb660f"",
  86.                    ""path"": ""<Keyboard>/a"",
  87.                    ""interactions"": """",
  88.                    ""processors"": """",
  89.                    ""groups"": """",
  90.                    ""action"": ""Movement"",
  91.                    ""isComposite"": false,
  92.                    ""isPartOfComposite"": true
  93.                },
  94.                {
  95.                    ""name"": ""right"",
  96.                    ""id"": ""95be9686-a6b9-4918-9997-29f4bbbf807d"",
  97.                    ""path"": ""<Keyboard>/d"",
  98.                    ""interactions"": """",
  99.                    ""processors"": """",
  100.                    ""groups"": """",
  101.                    ""action"": ""Movement"",
  102.                    ""isComposite"": false,
  103.                    ""isPartOfComposite"": true
  104.                },
  105.                {
  106.                    ""name"": """",
  107.                    ""id"": ""fc6ca4ef-2ed9-4062-9677-d1088951764b"",
  108.                    ""path"": ""<Keyboard>/space"",
  109.                    ""interactions"": """",
  110.                    ""processors"": """",
  111.                    ""groups"": """",
  112.                    ""action"": ""Jump"",
  113.                    ""isComposite"": false,
  114.                    ""isPartOfComposite"": false
  115.                }
  116.            ]
  117.        }
  118.    ],
  119.    ""controlSchemes"": []
  120. }");
  121.         // onFoot
  122.         m_onFoot = asset.FindActionMap("onFoot", throwIfNotFound: true);
  123.         m_onFoot_Movement = m_onFoot.FindAction("Movement", throwIfNotFound: true);
  124.         m_onFoot_Jump = m_onFoot.FindAction("Jump", throwIfNotFound: true);
  125.     }
  126.  
  127.     public void Dispose()
  128.     {
  129.         UnityEngine.Object.Destroy(asset);
  130.     }
  131.  
  132.     public InputBinding? bindingMask
  133.     {
  134.         get => asset.bindingMask;
  135.         set => asset.bindingMask = value;
  136.     }
  137.  
  138.     public ReadOnlyArray<InputDevice>? devices
  139.     {
  140.         get => asset.devices;
  141.         set => asset.devices = value;
  142.     }
  143.  
  144.     public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
  145.  
  146.     public bool Contains(InputAction action)
  147.     {
  148.         return asset.Contains(action);
  149.     }
  150.  
  151.     public IEnumerator<InputAction> GetEnumerator()
  152.     {
  153.         return asset.GetEnumerator();
  154.     }
  155.  
  156.     IEnumerator IEnumerable.GetEnumerator()
  157.     {
  158.         return GetEnumerator();
  159.     }
  160.  
  161.     public void Enable()
  162.     {
  163.         asset.Enable();
  164.     }
  165.  
  166.     public void Disable()
  167.     {
  168.         asset.Disable();
  169.     }
  170.     public IEnumerable<InputBinding> bindings => asset.bindings;
  171.  
  172.     public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
  173.     {
  174.         return asset.FindAction(actionNameOrId, throwIfNotFound);
  175.     }
  176.     public int FindBinding(InputBinding bindingMask, out InputAction action)
  177.     {
  178.         return asset.FindBinding(bindingMask, out action);
  179.     }
  180.  
  181.     // onFoot
  182.     private readonly InputActionMap m_onFoot;
  183.     private IOnFootActions m_OnFootActionsCallbackInterface;
  184.     private readonly InputAction m_onFoot_Movement;
  185.     private readonly InputAction m_onFoot_Jump;
  186.     public struct OnFootActions
  187.     {
  188.         private @PlayerInput m_Wrapper;
  189.         public OnFootActions(@PlayerInput wrapper) { m_Wrapper = wrapper; }
  190.         public InputAction @Movement => m_Wrapper.m_onFoot_Movement;
  191.         public InputAction @Jump => m_Wrapper.m_onFoot_Jump;
  192.         public InputActionMap Get() { return m_Wrapper.m_onFoot; }
  193.         public void Enable() => Get().Enable();
  194.         public void Disable() { Get().Disable(); }
  195.         public bool enabled => Get().enabled;
  196.         public static implicit operator InputActionMap(OnFootActions set) { return set.Get(); }
  197.         public void SetCallbacks(IOnFootActions instance)
  198.         {
  199.             if (m_Wrapper.m_OnFootActionsCallbackInterface != null)
  200.             {
  201.                 @Movement.started -= m_Wrapper.m_OnFootActionsCallbackInterface.OnMovement;
  202.                 @Movement.performed -= m_Wrapper.m_OnFootActionsCallbackInterface.OnMovement;
  203.                 @Movement.canceled -= m_Wrapper.m_OnFootActionsCallbackInterface.OnMovement;
  204.                 @Jump.started -= m_Wrapper.m_OnFootActionsCallbackInterface.OnJump;
  205.                 @Jump.performed -= m_Wrapper.m_OnFootActionsCallbackInterface.OnJump;
  206.                 @Jump.canceled -= m_Wrapper.m_OnFootActionsCallbackInterface.OnJump;
  207.             }
  208.             m_Wrapper.m_OnFootActionsCallbackInterface = instance;
  209.             if (instance != null)
  210.             {
  211.                 @Movement.started += instance.OnMovement;
  212.                 @Movement.performed += instance.OnMovement;
  213.                 @Movement.canceled += instance.OnMovement;
  214.                 @Jump.started += instance.OnJump;
  215.                 @Jump.performed += instance.OnJump;
  216.                 @Jump.canceled += instance.OnJump;
  217.             }
  218.         }
  219.     }
  220.     public OnFootActions @onFoot => new OnFootActions(this);
  221.     public interface IOnFootActions
  222.     {
  223.         void OnMovement(InputAction.CallbackContext context);
  224.         void OnJump(InputAction.CallbackContext context);
  225.     }
  226. }
  227.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement