2026-03-31 물체 상호작용
This commit is contained in:
@@ -25,6 +25,7 @@ public class InputManager : MonoBehaviour
|
||||
public event Action<InputState> OnDodgeEvent;
|
||||
public event Action OnNormalAttackEvent;
|
||||
public event Action OnHeavyAttackEvent;
|
||||
public event Action OnInteractionEvent;
|
||||
|
||||
|
||||
//키조작
|
||||
@@ -34,6 +35,7 @@ public class InputManager : MonoBehaviour
|
||||
public event Action OnKeyDown_IKeyEvent;
|
||||
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance == null)
|
||||
@@ -102,7 +104,11 @@ public void SetCharacterInputMap(string mapName)
|
||||
BindActionCharacter("Dodge", OnDodge);
|
||||
BindActionCharacter("NormalAttack", OnNormalAttack);
|
||||
BindActionCharacter("HeavyAttack", OnHeavyAttack);
|
||||
|
||||
BindActionCharacter("Interaction", OnInteraction);
|
||||
|
||||
BindActionCharacter("OnkeyDown_IKey", OnKeyDown_IKey);
|
||||
|
||||
|
||||
_characterInputActionMap.Disable();
|
||||
|
||||
@@ -211,6 +217,12 @@ private void OnHeavyAttack(InputAction.CallbackContext ctx)
|
||||
{
|
||||
OnHeavyAttackEvent?.Invoke();
|
||||
}
|
||||
|
||||
private void OnInteraction(InputAction.CallbackContext ctx)
|
||||
{
|
||||
if (ctx.started)
|
||||
OnInteractionEvent?.Invoke();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 키별 조작
|
||||
|
||||
Reference in New Issue
Block a user