new movement system work
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user