234 lines
7.8 KiB
C#
234 lines
7.8 KiB
C#
|
//------------------------------------------------------------------------------
|
||
|
// <auto-generated>
|
||
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||
|
// version 1.7.0
|
||
|
// from Assets/Ether/Scripts/Module/Input/ReInput/ReInputCfg/ReInputActions.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 @ReInputActions: IInputActionCollection2, IDisposable
|
||
|
{
|
||
|
public InputActionAsset asset { get; }
|
||
|
public @ReInputActions()
|
||
|
{
|
||
|
asset = InputActionAsset.FromJson(@"{
|
||
|
""name"": ""ReInputActions"",
|
||
|
""maps"": [
|
||
|
{
|
||
|
""name"": ""PC"",
|
||
|
""id"": ""082389c7-be0f-4ce1-8298-f0745f6c7dd5"",
|
||
|
""actions"": [
|
||
|
{
|
||
|
""name"": ""Move"",
|
||
|
""type"": ""Value"",
|
||
|
""id"": ""13e807e9-eccf-4c0d-9694-36806ec749cf"",
|
||
|
""expectedControlType"": ""Vector2"",
|
||
|
""processors"": """",
|
||
|
""interactions"": """",
|
||
|
""initialStateCheck"": true
|
||
|
}
|
||
|
],
|
||
|
""bindings"": [
|
||
|
{
|
||
|
""name"": ""WSAD"",
|
||
|
""id"": ""431ea072-3b1a-4156-9629-90054ff681b8"",
|
||
|
""path"": ""2DVector"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": true,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": ""up"",
|
||
|
""id"": ""cb5389a3-df93-4c70-9975-1c0cbdd8f813"",
|
||
|
""path"": ""<Keyboard>/w"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": ""down"",
|
||
|
""id"": ""d0469713-2967-470d-8998-cee0446882c0"",
|
||
|
""path"": ""<Keyboard>/s"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": ""left"",
|
||
|
""id"": ""fe75450b-975c-4bda-aea1-db0fd5e27e37"",
|
||
|
""path"": ""<Keyboard>/a"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": ""right"",
|
||
|
""id"": ""e3c6eefd-5a44-404f-af48-5d941a855bdd"",
|
||
|
""path"": ""<Keyboard>/d"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": true
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""78ba69b8-2919-4a9e-b218-460c068f8bf2"",
|
||
|
""path"": ""<Gamepad>/dpad"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
},
|
||
|
{
|
||
|
""name"": """",
|
||
|
""id"": ""6b8171dd-468f-4ad3-b11d-481532be2844"",
|
||
|
""path"": ""<Gamepad>/leftStick"",
|
||
|
""interactions"": """",
|
||
|
""processors"": """",
|
||
|
""groups"": """",
|
||
|
""action"": ""Move"",
|
||
|
""isComposite"": false,
|
||
|
""isPartOfComposite"": false
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
""controlSchemes"": []
|
||
|
}");
|
||
|
// PC
|
||
|
m_PC = asset.FindActionMap("PC", throwIfNotFound: true);
|
||
|
m_PC_Move = m_PC.FindAction("Move", 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);
|
||
|
}
|
||
|
|
||
|
// PC
|
||
|
private readonly InputActionMap m_PC;
|
||
|
private List<IPCActions> m_PCActionsCallbackInterfaces = new List<IPCActions>();
|
||
|
private readonly InputAction m_PC_Move;
|
||
|
public struct PCActions
|
||
|
{
|
||
|
private @ReInputActions m_Wrapper;
|
||
|
public PCActions(@ReInputActions wrapper) { m_Wrapper = wrapper; }
|
||
|
public InputAction @Move => m_Wrapper.m_PC_Move;
|
||
|
public InputActionMap Get() { return m_Wrapper.m_PC; }
|
||
|
public void Enable() { Get().Enable(); }
|
||
|
public void Disable() { Get().Disable(); }
|
||
|
public bool enabled => Get().enabled;
|
||
|
public static implicit operator InputActionMap(PCActions set) { return set.Get(); }
|
||
|
public void AddCallbacks(IPCActions instance)
|
||
|
{
|
||
|
if (instance == null || m_Wrapper.m_PCActionsCallbackInterfaces.Contains(instance)) return;
|
||
|
m_Wrapper.m_PCActionsCallbackInterfaces.Add(instance);
|
||
|
@Move.started += instance.OnMove;
|
||
|
@Move.performed += instance.OnMove;
|
||
|
@Move.canceled += instance.OnMove;
|
||
|
}
|
||
|
|
||
|
private void UnregisterCallbacks(IPCActions instance)
|
||
|
{
|
||
|
@Move.started -= instance.OnMove;
|
||
|
@Move.performed -= instance.OnMove;
|
||
|
@Move.canceled -= instance.OnMove;
|
||
|
}
|
||
|
|
||
|
public void RemoveCallbacks(IPCActions instance)
|
||
|
{
|
||
|
if (m_Wrapper.m_PCActionsCallbackInterfaces.Remove(instance))
|
||
|
UnregisterCallbacks(instance);
|
||
|
}
|
||
|
|
||
|
public void SetCallbacks(IPCActions instance)
|
||
|
{
|
||
|
foreach (var item in m_Wrapper.m_PCActionsCallbackInterfaces)
|
||
|
UnregisterCallbacks(item);
|
||
|
m_Wrapper.m_PCActionsCallbackInterfaces.Clear();
|
||
|
AddCallbacks(instance);
|
||
|
}
|
||
|
}
|
||
|
public PCActions @PC => new PCActions(this);
|
||
|
public interface IPCActions
|
||
|
{
|
||
|
void OnMove(InputAction.CallbackContext context);
|
||
|
}
|
||
|
}
|