init
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user