new movement system work

This commit is contained in:
Vova
2024-01-04 09:59:29 +02:00
parent 72c24ac8a7
commit 6ac52e1665
3 changed files with 121 additions and 1 deletions
+11 -1
View File
@@ -30,7 +30,7 @@ public class Player : Character
public event EventHandler<TreasureType> OnPlayerTakeItem;
public InputActions _inputActions = new InputActions();
private InputActions _inputActions;
private void Awake()
{
@@ -43,9 +43,19 @@ public class Player : Character
PlayerPrefs.SetString("lastExitName", string.Empty);
Instance = this;
DontDestroyOnLoad(gameObject);
_inputActions = new InputActions();
}
private void OnEnable()
{
_inputActions.Enable();
}
private void OnDisable()
{
_inputActions.Disable();
}
public void AddCoin()
{
_totalCoins++;