Managed INput

This commit is contained in:
Mausham
2025-12-15 18:34:06 -08:00
parent 5a95751da2
commit a166fe2861
2 changed files with 2 additions and 9 deletions

View File

@@ -25,7 +25,6 @@ public class InputReaderSO : ScriptableObject, GameInputAction.IPlayerActions ,
if(action == null) action = new GameInputAction();
action.Enable();
action.Player.SetCallbacks(this);
blockedInput = false;
isMouseButtonPressed= false;
}
@@ -36,9 +35,7 @@ public class InputReaderSO : ScriptableObject, GameInputAction.IPlayerActions ,
public void OnDrag(InputAction.CallbackContext context)
{
if (blockedInput) return;
dragInput = context.ReadValue<Vector2>();
}
public void OnMouseClicked(InputAction.CallbackContext context)
@@ -48,11 +45,11 @@ public class InputReaderSO : ScriptableObject, GameInputAction.IPlayerActions ,
public void LockInput()
{
blockedInput = true;
action.Player.Disable();
}
public void UnlockInput()
{
blockedInput = false;
action.Player.Enable();
}
}