32 lines
839 B
C#
32 lines
839 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.InputSystem;
|
||
|
|
||
|
namespace BITKit
|
||
|
{
|
||
|
public interface IUnityInputActionProvider
|
||
|
{
|
||
|
InputAction InputAction { get; }
|
||
|
}
|
||
|
|
||
|
public interface IUnityInputActionCallbackContextReceiver
|
||
|
{
|
||
|
void OnContext(InputAction.CallbackContext context);
|
||
|
}
|
||
|
|
||
|
[System.Serializable]
|
||
|
public class UnityInputAction : IUnityInputActionProvider
|
||
|
{
|
||
|
[SerializeField] private InputAction inputAction;
|
||
|
public InputAction InputAction => inputAction;
|
||
|
}
|
||
|
|
||
|
[System.Serializable]
|
||
|
public class UnityInputActionReference : IUnityInputActionProvider
|
||
|
{
|
||
|
[SerializeField] private InputActionReference inputActionReference;
|
||
|
public InputAction InputAction => inputActionReference.action;
|
||
|
}
|
||
|
}
|