123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- // GENERATED AUTOMATICALLY FROM 'Assets/Samples/SimpleDemo/SimpleControls.inputactions'
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine.InputSystem;
- using UnityEngine.InputSystem.Utilities;
- public class @SimpleControls: IInputActionCollection, IDisposable
- {
- public InputActionAsset asset { get; }
- public @SimpleControls()
- {
- asset = InputActionAsset.FromJson(@"{
- ""name"": ""SimpleControls"",
- ""maps"": [
- {
- ""name"": ""gameplay"",
- ""id"": ""265c38f5-dd18-4d34-b198-aec58e1627ff"",
- ""actions"": [
- {
- ""name"": ""fire"",
- ""type"": ""Button"",
- ""id"": ""1077f913-a9f9-41b1-acb3-b9ee0adbc744"",
- ""expectedControlType"": ""Button"",
- ""processors"": """",
- ""interactions"": ""Tap,SlowTap""
- },
- {
- ""name"": ""move"",
- ""type"": ""Value"",
- ""id"": ""50fd2809-3aa3-4a90-988e-1facf6773553"",
- ""expectedControlType"": ""Vector2"",
- ""processors"": """",
- ""interactions"": """"
- },
- {
- ""name"": ""look"",
- ""type"": ""Value"",
- ""id"": ""c60e0974-d140-4597-a40e-9862193067e9"",
- ""expectedControlType"": ""Vector2"",
- ""processors"": """",
- ""interactions"": """"
- }
- ],
- ""bindings"": [
- {
- ""name"": """",
- ""id"": ""abb776f3-f329-4f7b-bbf8-b577d13be018"",
- ""path"": ""*/{PrimaryAction}"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""fire"",
- ""isComposite"": false,
- ""isPartOfComposite"": false
- },
- {
- ""name"": """",
- ""id"": ""e1b8c4dd-7b3a-4db6-a93a-0889b59b1afc"",
- ""path"": ""<Gamepad>/leftStick"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""move"",
- ""isComposite"": false,
- ""isPartOfComposite"": false
- },
- {
- ""name"": ""Dpad"",
- ""id"": ""cefc16fc-557a-44b0-939f-2ad792876b07"",
- ""path"": ""Dpad"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""move"",
- ""isComposite"": true,
- ""isPartOfComposite"": false
- },
- {
- ""name"": ""up"",
- ""id"": ""07244659-79df-461d-b329-defbe2fbc5f6"",
- ""path"": ""<Keyboard>/w"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""move"",
- ""isComposite"": false,
- ""isPartOfComposite"": true
- },
- {
- ""name"": ""down"",
- ""id"": ""f0ec75cb-f02c-40d2-a33f-1fd6eab2ae0b"",
- ""path"": ""<Keyboard>/s"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""move"",
- ""isComposite"": false,
- ""isPartOfComposite"": true
- },
- {
- ""name"": ""left"",
- ""id"": ""21fe6bfe-4721-4483-9f4a-a0031ade105c"",
- ""path"": ""<Keyboard>/a"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""move"",
- ""isComposite"": false,
- ""isPartOfComposite"": true
- },
- {
- ""name"": ""right"",
- ""id"": ""2dd39746-c75c-4a11-838a-e59eacaf4e0b"",
- ""path"": ""<Keyboard>/d"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""move"",
- ""isComposite"": false,
- ""isPartOfComposite"": true
- },
- {
- ""name"": """",
- ""id"": ""c106d6e6-2780-47ff-b318-396171bd54cc"",
- ""path"": ""<Gamepad>/rightStick"",
- ""interactions"": """",
- ""processors"": """",
- ""groups"": """",
- ""action"": ""look"",
- ""isComposite"": false,
- ""isPartOfComposite"": false
- },
- {
- ""name"": """",
- ""id"": ""578caa03-6827-4797-adfc-a59770c437fe"",
- ""path"": ""<Pointer>/delta"",
- ""interactions"": """",
- ""processors"": ""ScaleVector2(x=2,y=2)"",
- ""groups"": """",
- ""action"": ""look"",
- ""isComposite"": false,
- ""isPartOfComposite"": false
- }
- ]
- }
- ],
- ""controlSchemes"": []
- }");
- // gameplay
- m_gameplay = asset.FindActionMap("gameplay", throwIfNotFound: true);
- m_gameplay_fire = m_gameplay.FindAction("fire", throwIfNotFound: true);
- m_gameplay_move = m_gameplay.FindAction("move", throwIfNotFound: true);
- m_gameplay_look = m_gameplay.FindAction("look", 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_fire;
- private readonly InputAction m_gameplay_move;
- private readonly InputAction m_gameplay_look;
- public struct GameplayActions
- {
- private @SimpleControls m_Wrapper;
- public GameplayActions(@SimpleControls wrapper) { m_Wrapper = wrapper; }
- public InputAction @fire => m_Wrapper.m_gameplay_fire;
- public InputAction @move => m_Wrapper.m_gameplay_move;
- public InputAction @look => m_Wrapper.m_gameplay_look;
- 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)
- {
- @fire.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnFire;
- @fire.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnFire;
- @fire.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnFire;
- @move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
- @move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
- @move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
- @look.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook;
- @look.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook;
- @look.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnLook;
- }
- m_Wrapper.m_GameplayActionsCallbackInterface = instance;
- if (instance != null)
- {
- @fire.started += instance.OnFire;
- @fire.performed += instance.OnFire;
- @fire.canceled += instance.OnFire;
- @move.started += instance.OnMove;
- @move.performed += instance.OnMove;
- @move.canceled += instance.OnMove;
- @look.started += instance.OnLook;
- @look.performed += instance.OnLook;
- @look.canceled += instance.OnLook;
- }
- }
- }
- public GameplayActions @gameplay => new GameplayActions(this);
- public interface IGameplayActions
- {
- void OnFire(InputAction.CallbackContext context);
- void OnMove(InputAction.CallbackContext context);
- void OnLook(InputAction.CallbackContext context);
- }
- }
|