기본 공격 구현

This commit is contained in:
2026-09-24 01:52:29 +09:00
parent 4a08a9d085
commit da4075e42e
36 changed files with 570 additions and 425 deletions

View File

@@ -10,6 +10,7 @@ public class InputManager : MonoBehaviour, GameInput.ICharacterActions
private GameInput _input;
public event Action<Vector2> OnMove_Event;
public event Action OnAttack_Event;
private void Awake()
{
@@ -39,4 +40,10 @@ public void OnMove(InputAction.CallbackContext ctx)
if (ctx.phase == InputActionPhase.Performed || ctx.phase == InputActionPhase.Canceled)
OnMove_Event?.Invoke(ctx.ReadValue<Vector2>());
}
public void OnAttack(InputAction.CallbackContext ctx)
{
if (ctx.phase == InputActionPhase.Started)
OnAttack_Event?.Invoke();
}
}