2026-03-19 대시 메서드 진행중
This commit is contained in:
@@ -31,8 +31,9 @@ private void Awake()
|
||||
|
||||
private async Awaitable Start()
|
||||
{
|
||||
await LoadUserCharacters(1);
|
||||
await LoadPlayableCharacters();
|
||||
|
||||
//await LoadUserCharacters(1);
|
||||
//await LoadPlayableCharacters();
|
||||
}
|
||||
|
||||
public async Awaitable LoadUserCharacters(int userNo)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -104,6 +104,7 @@ public void OnSceneLoaded(Scene scene, LoadSceneMode mode)
|
||||
InputManager.Instance.OnJumpEvent += CurrentCharacterController.JumpInput;
|
||||
InputManager.Instance.OnAimToggleEvent += CurrentCharacterController.AimToggleInput;
|
||||
InputManager.Instance.OnLookEvent += CurrentCharacterController.LookInput;
|
||||
InputManager.Instance.OnDodgeEvent += CurrentCharacterController.DodgeInput;
|
||||
//InputManager.Instance.OnNormalAttackEvent;
|
||||
//InputManager.Instance.OnHeavyAttackEvent;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user