add new input mouse system
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using UnityEngine;
|
||||
using static InputActions;
|
||||
|
||||
public class InputManager : MonoBehaviour
|
||||
{
|
||||
private InputActions _inputActions;
|
||||
public static InputManager Instance { get; private set; }
|
||||
|
||||
public PlayerActions PlayerAction { get; private set; }
|
||||
public CameraActions CameraAction { get; private set; }
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null)
|
||||
{
|
||||
Debug.Log("There's more than one Input manager instance");
|
||||
}
|
||||
Instance = this;
|
||||
|
||||
_inputActions = new InputActions();
|
||||
|
||||
PlayerAction = _inputActions.Player;
|
||||
CameraAction = _inputActions.Camera;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_inputActions.Enable();
|
||||
}
|
||||
private void OnDisable()
|
||||
{
|
||||
_inputActions.Disable();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user