175 lines
5.6 KiB
C#
175 lines
5.6 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
|
// version 1.3.0
|
|
// from Assets/InputMaster.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 @InputMaster : IInputActionCollection2, IDisposable
|
|
{
|
|
public InputActionAsset asset { get; }
|
|
public @InputMaster()
|
|
{
|
|
asset = InputActionAsset.FromJson(@"{
|
|
""name"": ""InputMaster"",
|
|
""maps"": [
|
|
{
|
|
""name"": ""Menu"",
|
|
""id"": ""725208ea-b0f7-41fe-982e-4e4f1968f986"",
|
|
""actions"": [
|
|
{
|
|
""name"": ""Pause"",
|
|
""type"": ""Button"",
|
|
""id"": ""6c625271-9120-4d38-a871-07fa3656839f"",
|
|
""expectedControlType"": ""Button"",
|
|
""processors"": """",
|
|
""interactions"": """",
|
|
""initialStateCheck"": false
|
|
}
|
|
],
|
|
""bindings"": [
|
|
{
|
|
""name"": """",
|
|
""id"": ""9af28864-137e-4371-9bba-31d99ca1d162"",
|
|
""path"": ""<Keyboard>/space"",
|
|
""interactions"": ""Press"",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""0b994463-6cbd-4144-9d18-a6cd898b2e06"",
|
|
""path"": ""<Keyboard>/p"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
},
|
|
{
|
|
""name"": """",
|
|
""id"": ""f6e7edd8-d5b2-4e34-b651-eeeabdc4a16b"",
|
|
""path"": ""<Keyboard>/escape"",
|
|
""interactions"": """",
|
|
""processors"": """",
|
|
""groups"": """",
|
|
""action"": ""Pause"",
|
|
""isComposite"": false,
|
|
""isPartOfComposite"": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
""controlSchemes"": []
|
|
}");
|
|
// Menu
|
|
m_Menu = asset.FindActionMap("Menu", throwIfNotFound: true);
|
|
m_Menu_Pause = m_Menu.FindAction("Pause", 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);
|
|
}
|
|
|
|
// Menu
|
|
private readonly InputActionMap m_Menu;
|
|
private IMenuActions m_MenuActionsCallbackInterface;
|
|
private readonly InputAction m_Menu_Pause;
|
|
public struct MenuActions
|
|
{
|
|
private @InputMaster m_Wrapper;
|
|
public MenuActions(@InputMaster wrapper) { m_Wrapper = wrapper; }
|
|
public InputAction @Pause => m_Wrapper.m_Menu_Pause;
|
|
public InputActionMap Get() { return m_Wrapper.m_Menu; }
|
|
public void Enable() { Get().Enable(); }
|
|
public void Disable() { Get().Disable(); }
|
|
public bool enabled => Get().enabled;
|
|
public static implicit operator InputActionMap(MenuActions set) { return set.Get(); }
|
|
public void SetCallbacks(IMenuActions instance)
|
|
{
|
|
if (m_Wrapper.m_MenuActionsCallbackInterface != null)
|
|
{
|
|
@Pause.started -= m_Wrapper.m_MenuActionsCallbackInterface.OnPause;
|
|
@Pause.performed -= m_Wrapper.m_MenuActionsCallbackInterface.OnPause;
|
|
@Pause.canceled -= m_Wrapper.m_MenuActionsCallbackInterface.OnPause;
|
|
}
|
|
m_Wrapper.m_MenuActionsCallbackInterface = instance;
|
|
if (instance != null)
|
|
{
|
|
@Pause.started += instance.OnPause;
|
|
@Pause.performed += instance.OnPause;
|
|
@Pause.canceled += instance.OnPause;
|
|
}
|
|
}
|
|
}
|
|
public MenuActions @Menu => new MenuActions(this);
|
|
public interface IMenuActions
|
|
{
|
|
void OnPause(InputAction.CallbackContext context);
|
|
}
|
|
}
|