File size: 6,508 Bytes
18a519f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
// version 1.4.3
// from Assets/Samples/DocsSamples/SimpleActions.inputactions
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Utilities;
public partial class @SimpleActions: IInputActionCollection2, IDisposable
{
public InputActionAsset asset { get; }
public @SimpleActions()
{
asset = InputActionAsset.FromJson(@"{
""name"": ""SimpleActions"",
""maps"": [
{
""name"": ""gameplay"",
""id"": ""d55be63c-61eb-47ef-92dd-eef1248d601e"",
""actions"": [
{
""name"": ""move"",
""type"": ""Value"",
""id"": ""8387a17d-aedd-4411-9931-6a855a8299fb"",
""expectedControlType"": ""Vector2"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": true
},
{
""name"": ""jump"",
""type"": ""Button"",
""id"": ""7fc1eb3c-b4d1-4aba-9a58-f36cac532d06"",
""expectedControlType"": ""Button"",
""processors"": """",
""interactions"": """",
""initialStateCheck"": false
}
],
""bindings"": [
{
""name"": """",
""id"": ""2c541328-ed00-4524-817c-97599bac7de5"",
""path"": ""<Gamepad>{Player1}/leftStick"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""move"",
""isComposite"": false,
""isPartOfComposite"": false
},
{
""name"": """",
""id"": ""c48db537-b211-412a-a86a-d31614bebb5d"",
""path"": ""<Gamepad>{Player1}/buttonSouth"",
""interactions"": """",
""processors"": """",
""groups"": """",
""action"": ""jump"",
""isComposite"": false,
""isPartOfComposite"": false
}
]
}
],
""controlSchemes"": []
}");
// gameplay
m_gameplay = asset.FindActionMap("gameplay", throwIfNotFound: true);
m_gameplay_move = m_gameplay.FindAction("move", throwIfNotFound: true);
m_gameplay_jump = m_gameplay.FindAction("jump", 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();
}
public IEnumerable<InputBinding> 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);
}
// gameplay
private readonly InputActionMap m_gameplay;
private IGameplayActions m_GameplayActionsCallbackInterface;
private readonly InputAction m_gameplay_move;
private readonly InputAction m_gameplay_jump;
public struct GameplayActions
{
private @SimpleActions m_Wrapper;
public GameplayActions(@SimpleActions wrapper) { m_Wrapper = wrapper; }
public InputAction @move => m_Wrapper.m_gameplay_move;
public InputAction @jump => m_Wrapper.m_gameplay_jump;
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)
{
@move.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@move.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@move.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnMove;
@jump.started -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@jump.performed -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
@jump.canceled -= m_Wrapper.m_GameplayActionsCallbackInterface.OnJump;
}
m_Wrapper.m_GameplayActionsCallbackInterface = instance;
if (instance != null)
{
@move.started += instance.OnMove;
@move.performed += instance.OnMove;
@move.canceled += instance.OnMove;
@jump.started += instance.OnJump;
@jump.performed += instance.OnJump;
@jump.canceled += instance.OnJump;
}
}
}
public GameplayActions @gameplay => new GameplayActions(this);
public interface IGameplayActions
{
void OnMove(InputAction.CallbackContext context);
void OnJump(InputAction.CallbackContext context);
}
}
|