add new input mouse system

This commit is contained in:
Vova
2023-12-10 18:46:51 +02:00
parent aa87424794
commit 1a114c10da
19 changed files with 861 additions and 100 deletions
+35
View File
@@ -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();
}
}