Class NeoFpsInputActions
Provides programmatic access to , , and instances defined in asset "Assets/NeoFPS/Extensions/InputSystem/Collections/NeoFpsInputActions.inputactions".
Inheritance
NeoFpsInputActions
Implements
System.IDisposable
Assembly: NeoFPS.dll
public class NeoFpsInputActions : IInputActionCollection2, IDisposable
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
}
Constructors
Constructs a new instance.
Declaration
public NeoFpsInputActions()
Properties
Provides access to the underlying asset instance.
Declaration
public InputActionAsset asset { get; }
Property Value
| Type |
Description |
| InputActionAsset |
|
Declaration
public InputBinding? bindingMask { get; set; }
Property Value
| Type |
Description |
| System.Nullable<InputBinding> |
|
Declaration
public IEnumerable<InputBinding> bindings { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<InputBinding> |
|
Declaration
public NeoFpsInputActions.CombatActions Combat { get; }
Property Value
Declaration
public ReadOnlyArray<InputControlScheme> controlSchemes { get; }
Property Value
| Type |
Description |
| ReadOnlyArray<InputControlScheme> |
|
Declaration
public ReadOnlyArray<InputDevice>? devices { get; set; }
Property Value
| Type |
Description |
| System.Nullable<ReadOnlyArray<InputDevice>> |
|
Provides access to the input control scheme.
Declaration
public InputControlScheme GamepadScheme { get; }
Property Value
| Type |
Description |
| InputControlScheme |
|
Declaration
public NeoFpsInputActions.InteractionActions Interaction { get; }
Property Value
Declaration
public NeoFpsInputActions.InventoryActions Inventory { get; }
Property Value
Provides access to the input control scheme.
Declaration
public InputControlScheme KeyboardAndMouseScheme { get; }
Property Value
| Type |
Description |
| InputControlScheme |
|
Declaration
public NeoFpsInputActions.MiscellaneousActions Miscellaneous { get; }
Property Value
Declaration
public NeoFpsInputActions.MovementActions Movement { get; }
Property Value
Methods
Declaration
public bool Contains(InputAction action)
Parameters
| Type |
Name |
Description |
| InputAction |
action |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
Destroys this asset and all associated instances.
Declaration
Declaration
Declaration
protected void Finalize()
Declaration
public InputAction FindAction(string actionNameOrId, bool throwIfNotFound = false)
Parameters
| Type |
Name |
Description |
| System.String |
actionNameOrId |
|
| System.Boolean |
throwIfNotFound |
|
Returns
| Type |
Description |
| InputAction |
|
Declaration
public int FindBinding(InputBinding bindingMask, out InputAction action)
Parameters
| Type |
Name |
Description |
| InputBinding |
bindingMask |
|
| InputAction |
action |
|
Returns
| Type |
Description |
| System.Int32 |
|
Declaration
public IEnumerator<InputAction> GetEnumerator()
Returns
| Type |
Description |
| System.Collections.Generic.IEnumerator<InputAction> |
|
Explicit Interface Implementations
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type |
Description |
| System.Collections.IEnumerator |
|
Implements
System.IDisposable