适应团结版本
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||||
// version 1.4.4
|
||||
// version 1.12.0
|
||||
// from Assets/Shader/Setting/InputActions.inputactions
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
@@ -15,9 +15,73 @@ using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
|
||||
public partial class @InputActions : IInputActionCollection2, IDisposable
|
||||
/// <summary>
|
||||
/// Provides programmatic access to <see cref="InputActionAsset" />, <see cref="InputActionMap" />, <see cref="InputAction" /> and <see cref="InputControlScheme" /> instances defined in asset "Assets/Shader/Setting/InputActions.inputactions".
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is source generated and any manual edits will be discarded if the associated asset is reimported or modified.
|
||||
/// </remarks>
|
||||
/// <example>
|
||||
/// <code>
|
||||
/// using namespace UnityEngine;
|
||||
/// using UnityEngine.InputSystem;
|
||||
///
|
||||
/// // Example of using an InputActionMap named "Player" from a UnityEngine.MonoBehaviour implementing callback interface.
|
||||
/// public class Example : MonoBehaviour, MyActions.IPlayerActions
|
||||
/// {
|
||||
/// private MyActions_Actions m_Actions; // Source code representation of asset.
|
||||
/// private MyActions_Actions.PlayerActions m_Player; // Source code representation of action map.
|
||||
///
|
||||
/// void Awake()
|
||||
/// {
|
||||
/// m_Actions = new MyActions_Actions(); // Create asset object.
|
||||
/// m_Player = m_Actions.Player; // Extract action map object.
|
||||
/// m_Player.AddCallbacks(this); // Register callback interface IPlayerActions.
|
||||
/// }
|
||||
///
|
||||
/// void OnDestroy()
|
||||
/// {
|
||||
/// m_Actions.Dispose(); // Destroy asset object.
|
||||
/// }
|
||||
///
|
||||
/// void OnEnable()
|
||||
/// {
|
||||
/// m_Player.Enable(); // Enable all actions within map.
|
||||
/// }
|
||||
///
|
||||
/// void OnDisable()
|
||||
/// {
|
||||
/// m_Player.Disable(); // Disable all actions within map.
|
||||
/// }
|
||||
///
|
||||
/// #region Interface implementation of MyActions.IPlayerActions
|
||||
///
|
||||
/// // Invoked when "Move" action is either started, performed or canceled.
|
||||
/// public void OnMove(InputAction.CallbackContext context)
|
||||
/// {
|
||||
/// Debug.Log($"OnMove: {context.ReadValue<Vector2>()}");
|
||||
/// }
|
||||
///
|
||||
/// // Invoked when "Attack" action is either started, performed or canceled.
|
||||
/// public void OnAttack(InputAction.CallbackContext context)
|
||||
/// {
|
||||
/// Debug.Log($"OnAttack: {context.ReadValue<float>()}");
|
||||
/// }
|
||||
///
|
||||
/// #endregion
|
||||
/// }
|
||||
/// </code>
|
||||
/// </example>
|
||||
public partial class @InputActions: IInputActionCollection2, IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides access to the underlying asset instance.
|
||||
/// </summary>
|
||||
public InputActionAsset asset { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
/// </summary>
|
||||
public @InputActions()
|
||||
{
|
||||
asset = InputActionAsset.FromJson(@"{
|
||||
@@ -339,55 +403,77 @@ public partial class @InputActions : IInputActionCollection2, IDisposable
|
||||
m_UI_Bag = m_UI.FindAction("Bag", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@InputActions()
|
||||
{
|
||||
UnityEngine.Debug.Assert(!m_GamePlay.enabled, "This will cause a leak and performance issues, InputActions.GamePlay.Disable() has not been called.");
|
||||
UnityEngine.Debug.Assert(!m_UI.enabled, "This will cause a leak and performance issues, InputActions.UI.Disable() has not been called.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destroys this asset and all associated <see cref="InputAction"/> instances.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Object.Destroy(asset);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.bindingMask" />
|
||||
public InputBinding? bindingMask
|
||||
{
|
||||
get => asset.bindingMask;
|
||||
set => asset.bindingMask = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.devices" />
|
||||
public ReadOnlyArray<InputDevice>? devices
|
||||
{
|
||||
get => asset.devices;
|
||||
set => asset.devices = value;
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.controlSchemes" />
|
||||
public ReadOnlyArray<InputControlScheme> controlSchemes => asset.controlSchemes;
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.Contains(InputAction)" />
|
||||
public bool Contains(InputAction action)
|
||||
{
|
||||
return asset.Contains(action);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.GetEnumerator()" />
|
||||
public IEnumerator<InputAction> GetEnumerator()
|
||||
{
|
||||
return asset.GetEnumerator();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IEnumerable.GetEnumerator()" />
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.Enable()" />
|
||||
public void Enable()
|
||||
{
|
||||
asset.Enable();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.Disable()" />
|
||||
public void Disable()
|
||||
{
|
||||
asset.Disable();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.bindings" />
|
||||
public IEnumerable<InputBinding> bindings => asset.bindings;
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.FindAction(string, bool)" />
|
||||
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
|
||||
{
|
||||
return asset.FindAction(actionNameOrId, throwIfNotFound);
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionAsset.FindBinding(InputBinding, out InputAction)" />
|
||||
public int FindBinding(InputBinding bindingMask, out InputAction action)
|
||||
{
|
||||
return asset.FindBinding(bindingMask, out action);
|
||||
@@ -395,102 +481,244 @@ public partial class @InputActions : IInputActionCollection2, IDisposable
|
||||
|
||||
// GamePlay
|
||||
private readonly InputActionMap m_GamePlay;
|
||||
private IGamePlayActions m_GamePlayActionsCallbackInterface;
|
||||
private List<IGamePlayActions> m_GamePlayActionsCallbackInterfaces = new List<IGamePlayActions>();
|
||||
private readonly InputAction m_GamePlay_Move;
|
||||
private readonly InputAction m_GamePlay_Dodge;
|
||||
private readonly InputAction m_GamePlay_ComBa_01;
|
||||
private readonly InputAction m_GamePlay_ComBa_02;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "GamePlay".
|
||||
/// </summary>
|
||||
public struct GamePlayActions
|
||||
{
|
||||
private @InputActions m_Wrapper;
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new instance of the input action map wrapper class.
|
||||
/// </summary>
|
||||
public GamePlayActions(@InputActions wrapper) { m_Wrapper = wrapper; }
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "GamePlay/Move".
|
||||
/// </summary>
|
||||
public InputAction @Move => m_Wrapper.m_GamePlay_Move;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "GamePlay/Dodge".
|
||||
/// </summary>
|
||||
public InputAction @Dodge => m_Wrapper.m_GamePlay_Dodge;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "GamePlay/ComBa_01".
|
||||
/// </summary>
|
||||
public InputAction @ComBa_01 => m_Wrapper.m_GamePlay_ComBa_01;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "GamePlay/ComBa_02".
|
||||
/// </summary>
|
||||
public InputAction @ComBa_02 => m_Wrapper.m_GamePlay_ComBa_02;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_GamePlay; }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.Enable()" />
|
||||
public void Enable() { Get().Enable(); }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.Disable()" />
|
||||
public void Disable() { Get().Disable(); }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.enabled" />
|
||||
public bool enabled => Get().enabled;
|
||||
/// <summary>
|
||||
/// Implicitly converts an <see ref="GamePlayActions" /> to an <see ref="InputActionMap" /> instance.
|
||||
/// </summary>
|
||||
public static implicit operator InputActionMap(GamePlayActions set) { return set.Get(); }
|
||||
/// <summary>
|
||||
/// Adds <see cref="InputAction.started"/>, <see cref="InputAction.performed"/> and <see cref="InputAction.canceled"/> callbacks provided via <param cref="instance" /> on all input actions contained in this map.
|
||||
/// </summary>
|
||||
/// <param name="instance">Callback instance.</param>
|
||||
/// <remarks>
|
||||
/// If <paramref name="instance" /> is <c>null</c> or <paramref name="instance"/> have already been added this method does nothing.
|
||||
/// </remarks>
|
||||
/// <seealso cref="GamePlayActions" />
|
||||
public void AddCallbacks(IGamePlayActions instance)
|
||||
{
|
||||
if (instance == null || m_Wrapper.m_GamePlayActionsCallbackInterfaces.Contains(instance)) return;
|
||||
m_Wrapper.m_GamePlayActionsCallbackInterfaces.Add(instance);
|
||||
@Move.started += instance.OnMove;
|
||||
@Move.performed += instance.OnMove;
|
||||
@Move.canceled += instance.OnMove;
|
||||
@Dodge.started += instance.OnDodge;
|
||||
@Dodge.performed += instance.OnDodge;
|
||||
@Dodge.canceled += instance.OnDodge;
|
||||
@ComBa_01.started += instance.OnComBa_01;
|
||||
@ComBa_01.performed += instance.OnComBa_01;
|
||||
@ComBa_01.canceled += instance.OnComBa_01;
|
||||
@ComBa_02.started += instance.OnComBa_02;
|
||||
@ComBa_02.performed += instance.OnComBa_02;
|
||||
@ComBa_02.canceled += instance.OnComBa_02;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes <see cref="InputAction.started"/>, <see cref="InputAction.performed"/> and <see cref="InputAction.canceled"/> callbacks provided via <param cref="instance" /> on all input actions contained in this map.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Calling this method when <paramref name="instance" /> have not previously been registered has no side-effects.
|
||||
/// </remarks>
|
||||
/// <seealso cref="GamePlayActions" />
|
||||
private void UnregisterCallbacks(IGamePlayActions instance)
|
||||
{
|
||||
@Move.started -= instance.OnMove;
|
||||
@Move.performed -= instance.OnMove;
|
||||
@Move.canceled -= instance.OnMove;
|
||||
@Dodge.started -= instance.OnDodge;
|
||||
@Dodge.performed -= instance.OnDodge;
|
||||
@Dodge.canceled -= instance.OnDodge;
|
||||
@ComBa_01.started -= instance.OnComBa_01;
|
||||
@ComBa_01.performed -= instance.OnComBa_01;
|
||||
@ComBa_01.canceled -= instance.OnComBa_01;
|
||||
@ComBa_02.started -= instance.OnComBa_02;
|
||||
@ComBa_02.performed -= instance.OnComBa_02;
|
||||
@ComBa_02.canceled -= instance.OnComBa_02;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters <param cref="instance" /> and unregisters all input action callbacks via <see cref="GamePlayActions.UnregisterCallbacks(IGamePlayActions)" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="GamePlayActions.UnregisterCallbacks(IGamePlayActions)" />
|
||||
public void RemoveCallbacks(IGamePlayActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_GamePlayActionsCallbackInterfaces.Remove(instance))
|
||||
UnregisterCallbacks(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via <param cref="instance" />.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If <paramref name="instance" /> is <c>null</c>, calling this method will only unregister all existing callbacks but not register any new callbacks.
|
||||
/// </remarks>
|
||||
/// <seealso cref="GamePlayActions.AddCallbacks(IGamePlayActions)" />
|
||||
/// <seealso cref="GamePlayActions.RemoveCallbacks(IGamePlayActions)" />
|
||||
/// <seealso cref="GamePlayActions.UnregisterCallbacks(IGamePlayActions)" />
|
||||
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;
|
||||
@Dodge.started -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnDodge;
|
||||
@Dodge.performed -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnDodge;
|
||||
@Dodge.canceled -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnDodge;
|
||||
@ComBa_01.started -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnComBa_01;
|
||||
@ComBa_01.performed -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnComBa_01;
|
||||
@ComBa_01.canceled -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnComBa_01;
|
||||
@ComBa_02.started -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnComBa_02;
|
||||
@ComBa_02.performed -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnComBa_02;
|
||||
@ComBa_02.canceled -= m_Wrapper.m_GamePlayActionsCallbackInterface.OnComBa_02;
|
||||
}
|
||||
m_Wrapper.m_GamePlayActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
{
|
||||
@Move.started += instance.OnMove;
|
||||
@Move.performed += instance.OnMove;
|
||||
@Move.canceled += instance.OnMove;
|
||||
@Dodge.started += instance.OnDodge;
|
||||
@Dodge.performed += instance.OnDodge;
|
||||
@Dodge.canceled += instance.OnDodge;
|
||||
@ComBa_01.started += instance.OnComBa_01;
|
||||
@ComBa_01.performed += instance.OnComBa_01;
|
||||
@ComBa_01.canceled += instance.OnComBa_01;
|
||||
@ComBa_02.started += instance.OnComBa_02;
|
||||
@ComBa_02.performed += instance.OnComBa_02;
|
||||
@ComBa_02.canceled += instance.OnComBa_02;
|
||||
}
|
||||
foreach (var item in m_Wrapper.m_GamePlayActionsCallbackInterfaces)
|
||||
UnregisterCallbacks(item);
|
||||
m_Wrapper.m_GamePlayActionsCallbackInterfaces.Clear();
|
||||
AddCallbacks(instance);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Provides a new <see cref="GamePlayActions" /> instance referencing this action map.
|
||||
/// </summary>
|
||||
public GamePlayActions @GamePlay => new GamePlayActions(this);
|
||||
|
||||
// UI
|
||||
private readonly InputActionMap m_UI;
|
||||
private IUIActions m_UIActionsCallbackInterface;
|
||||
private List<IUIActions> m_UIActionsCallbackInterfaces = new List<IUIActions>();
|
||||
private readonly InputAction m_UI_Stop;
|
||||
private readonly InputAction m_UI_Bag;
|
||||
/// <summary>
|
||||
/// Provides access to input actions defined in input action map "UI".
|
||||
/// </summary>
|
||||
public struct UIActions
|
||||
{
|
||||
private @InputActions m_Wrapper;
|
||||
|
||||
/// <summary>
|
||||
/// Construct a new instance of the input action map wrapper class.
|
||||
/// </summary>
|
||||
public UIActions(@InputActions wrapper) { m_Wrapper = wrapper; }
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "UI/Stop".
|
||||
/// </summary>
|
||||
public InputAction @Stop => m_Wrapper.m_UI_Stop;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action "UI/Bag".
|
||||
/// </summary>
|
||||
public InputAction @Bag => m_Wrapper.m_UI_Bag;
|
||||
/// <summary>
|
||||
/// Provides access to the underlying input action map instance.
|
||||
/// </summary>
|
||||
public InputActionMap Get() { return m_Wrapper.m_UI; }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.Enable()" />
|
||||
public void Enable() { Get().Enable(); }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.Disable()" />
|
||||
public void Disable() { Get().Disable(); }
|
||||
/// <inheritdoc cref="UnityEngine.InputSystem.InputActionMap.enabled" />
|
||||
public bool enabled => Get().enabled;
|
||||
/// <summary>
|
||||
/// Implicitly converts an <see ref="UIActions" /> to an <see ref="InputActionMap" /> instance.
|
||||
/// </summary>
|
||||
public static implicit operator InputActionMap(UIActions set) { return set.Get(); }
|
||||
/// <summary>
|
||||
/// Adds <see cref="InputAction.started"/>, <see cref="InputAction.performed"/> and <see cref="InputAction.canceled"/> callbacks provided via <param cref="instance" /> on all input actions contained in this map.
|
||||
/// </summary>
|
||||
/// <param name="instance">Callback instance.</param>
|
||||
/// <remarks>
|
||||
/// If <paramref name="instance" /> is <c>null</c> or <paramref name="instance"/> have already been added this method does nothing.
|
||||
/// </remarks>
|
||||
/// <seealso cref="UIActions" />
|
||||
public void AddCallbacks(IUIActions instance)
|
||||
{
|
||||
if (instance == null || m_Wrapper.m_UIActionsCallbackInterfaces.Contains(instance)) return;
|
||||
m_Wrapper.m_UIActionsCallbackInterfaces.Add(instance);
|
||||
@Stop.started += instance.OnStop;
|
||||
@Stop.performed += instance.OnStop;
|
||||
@Stop.canceled += instance.OnStop;
|
||||
@Bag.started += instance.OnBag;
|
||||
@Bag.performed += instance.OnBag;
|
||||
@Bag.canceled += instance.OnBag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes <see cref="InputAction.started"/>, <see cref="InputAction.performed"/> and <see cref="InputAction.canceled"/> callbacks provided via <param cref="instance" /> on all input actions contained in this map.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Calling this method when <paramref name="instance" /> have not previously been registered has no side-effects.
|
||||
/// </remarks>
|
||||
/// <seealso cref="UIActions" />
|
||||
private void UnregisterCallbacks(IUIActions instance)
|
||||
{
|
||||
@Stop.started -= instance.OnStop;
|
||||
@Stop.performed -= instance.OnStop;
|
||||
@Stop.canceled -= instance.OnStop;
|
||||
@Bag.started -= instance.OnBag;
|
||||
@Bag.performed -= instance.OnBag;
|
||||
@Bag.canceled -= instance.OnBag;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unregisters <param cref="instance" /> and unregisters all input action callbacks via <see cref="UIActions.UnregisterCallbacks(IUIActions)" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UIActions.UnregisterCallbacks(IUIActions)" />
|
||||
public void RemoveCallbacks(IUIActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_UIActionsCallbackInterfaces.Remove(instance))
|
||||
UnregisterCallbacks(instance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replaces all existing callback instances and previously registered input action callbacks associated with them with callbacks provided via <param cref="instance" />.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If <paramref name="instance" /> is <c>null</c>, calling this method will only unregister all existing callbacks but not register any new callbacks.
|
||||
/// </remarks>
|
||||
/// <seealso cref="UIActions.AddCallbacks(IUIActions)" />
|
||||
/// <seealso cref="UIActions.RemoveCallbacks(IUIActions)" />
|
||||
/// <seealso cref="UIActions.UnregisterCallbacks(IUIActions)" />
|
||||
public void SetCallbacks(IUIActions instance)
|
||||
{
|
||||
if (m_Wrapper.m_UIActionsCallbackInterface != null)
|
||||
{
|
||||
@Stop.started -= m_Wrapper.m_UIActionsCallbackInterface.OnStop;
|
||||
@Stop.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnStop;
|
||||
@Stop.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnStop;
|
||||
@Bag.started -= m_Wrapper.m_UIActionsCallbackInterface.OnBag;
|
||||
@Bag.performed -= m_Wrapper.m_UIActionsCallbackInterface.OnBag;
|
||||
@Bag.canceled -= m_Wrapper.m_UIActionsCallbackInterface.OnBag;
|
||||
}
|
||||
m_Wrapper.m_UIActionsCallbackInterface = instance;
|
||||
if (instance != null)
|
||||
{
|
||||
@Stop.started += instance.OnStop;
|
||||
@Stop.performed += instance.OnStop;
|
||||
@Stop.canceled += instance.OnStop;
|
||||
@Bag.started += instance.OnBag;
|
||||
@Bag.performed += instance.OnBag;
|
||||
@Bag.canceled += instance.OnBag;
|
||||
}
|
||||
foreach (var item in m_Wrapper.m_UIActionsCallbackInterfaces)
|
||||
UnregisterCallbacks(item);
|
||||
m_Wrapper.m_UIActionsCallbackInterfaces.Clear();
|
||||
AddCallbacks(instance);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Provides a new <see cref="UIActions" /> instance referencing this action map.
|
||||
/// </summary>
|
||||
public UIActions @UI => new UIActions(this);
|
||||
private int m_PCSchemeIndex = -1;
|
||||
/// <summary>
|
||||
/// Provides access to the input control scheme.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputControlScheme" />
|
||||
public InputControlScheme PCScheme
|
||||
{
|
||||
get
|
||||
@@ -500,6 +728,10 @@ public partial class @InputActions : IInputActionCollection2, IDisposable
|
||||
}
|
||||
}
|
||||
private int m_GamepadSchemeIndex = -1;
|
||||
/// <summary>
|
||||
/// Provides access to the input control scheme.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputControlScheme" />
|
||||
public InputControlScheme GamepadScheme
|
||||
{
|
||||
get
|
||||
@@ -508,16 +740,62 @@ public partial class @InputActions : IInputActionCollection2, IDisposable
|
||||
return asset.controlSchemes[m_GamepadSchemeIndex];
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "GamePlay" which allows adding and removing callbacks.
|
||||
/// </summary>
|
||||
/// <seealso cref="GamePlayActions.AddCallbacks(IGamePlayActions)" />
|
||||
/// <seealso cref="GamePlayActions.RemoveCallbacks(IGamePlayActions)" />
|
||||
public interface IGamePlayActions
|
||||
{
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Move" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnMove(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Dodge" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnDodge(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "ComBa_01" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnComBa_01(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "ComBa_02" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnComBa_02(InputAction.CallbackContext context);
|
||||
}
|
||||
/// <summary>
|
||||
/// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks.
|
||||
/// </summary>
|
||||
/// <seealso cref="UIActions.AddCallbacks(IUIActions)" />
|
||||
/// <seealso cref="UIActions.RemoveCallbacks(IUIActions)" />
|
||||
public interface IUIActions
|
||||
{
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Stop" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnStop(InputAction.CallbackContext context);
|
||||
/// <summary>
|
||||
/// Method invoked when associated input action "Bag" is either <see cref="UnityEngine.InputSystem.InputAction.started" />, <see cref="UnityEngine.InputSystem.InputAction.performed" /> or <see cref="UnityEngine.InputSystem.InputAction.canceled" />.
|
||||
/// </summary>
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.started" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.performed" />
|
||||
/// <seealso cref="UnityEngine.InputSystem.InputAction.canceled" />
|
||||
void OnBag(InputAction.CallbackContext context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user