2026-03-19 대시 메서드 진행중
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user