45 lines
1017 B
C#
45 lines
1017 B
C#
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
|
|
namespace VOID.Generic.Player.Input
|
|
{
|
|
[DefaultExecutionOrder(1)]
|
|
public class CastingInputManager : MonoBehaviour
|
|
{
|
|
public static CastingInputManager current {get; private set;}
|
|
|
|
private Inputs _inputs;
|
|
|
|
// Input actions for player controlling
|
|
public InputAction confirm {get; private set;}
|
|
public InputAction cancel {get; private set;}
|
|
|
|
private void Awake()
|
|
{
|
|
current = this;
|
|
_inputs = new Inputs();
|
|
|
|
// PlayerDefaultUse
|
|
confirm = _inputs.CastingControls.Confirm;
|
|
cancel = _inputs.CastingControls.Cancel;
|
|
}
|
|
|
|
private void Start()
|
|
{
|
|
enabled = false;
|
|
}
|
|
|
|
private void OnEnable()
|
|
{
|
|
confirm.Enable();
|
|
cancel.Enable();
|
|
}
|
|
|
|
private void OnDisable()
|
|
{
|
|
confirm.Disable();
|
|
cancel.Disable();
|
|
}
|
|
}
|
|
}
|