2026-03-19 대시 메서드 진행중

This commit is contained in:
2026-03-19 18:15:01 +09:00
parent b6b90e6ad6
commit 086034de23
29 changed files with 1061 additions and 89 deletions

View File

@@ -22,6 +22,7 @@ public class InputManager : MonoBehaviour
public event Action<InputState> OnJumpEvent;
public event Action<InputState> OnAimToggleEvent;
public event Action<Vector2> OnLookEvent;
public event Action<InputState> OnDodgeEvent;
public event Action OnNormalAttackEvent;
public event Action OnHeavyAttackEvent;
@@ -100,6 +101,7 @@ public void SetCharacterInputMap(string mapName)
BindActionCharacter("Jump", OnJump);
BindActionCharacter("AimToggle", OnAimToggle);
BindActionCharacter("Look", OnLook);
BindActionCharacter("Dodge", OnDodge);
BindActionCharacter("NormalAttack", OnNormalAttack);
BindActionCharacter("HeavyAttack", OnHeavyAttack);
@@ -189,6 +191,15 @@ private void OnLook(InputAction.CallbackContext ctx)
Vector2 look = ctx.ReadValue<Vector2>();
OnLookEvent?.Invoke(look);
}
private void OnDodge(InputAction.CallbackContext ctx)
{
if(ctx.started)
{
OnDodgeEvent?.Invoke(InputState.Started);
}
}
private void OnNormalAttack(InputAction.CallbackContext ctx)
{
OnNormalAttackEvent?.Invoke();