Game UI ready

This commit is contained in:
Mausham
2025-12-15 17:49:08 -08:00
parent 0ea929bd20
commit f4c55dec05
325 changed files with 28015 additions and 360 deletions

View File

@@ -5,7 +5,9 @@ public interface IInputReader
{
event Action<Vector2> OnDragValueChanged;
bool isMouseButtonPressed { get; }
bool blockedInput { get; set; }
Vector2 dragInput { get; }
void LockInput();
void UnlockInput();
}

View File

@@ -15,10 +15,9 @@ public class InputReaderSO : ScriptableObject, GameInputAction.IPlayerActions ,
}
public bool isMouseButtonPressed { get;private set; }
public bool blockedInput { get; set; }
private bool blockedInput = false;
private Vector2 _dragInput;
private GameInputAction action;
private void OnEnable()
@@ -44,7 +43,16 @@ public class InputReaderSO : ScriptableObject, GameInputAction.IPlayerActions ,
public void OnMouseClicked(InputAction.CallbackContext context)
{
if (blockedInput) return;
isMouseButtonPressed = context.ReadValue<float>() == 1 ? true : false;
}
public void LockInput()
{
blockedInput = true;
}
public void UnlockInput()
{
blockedInput = false;
}
}