update jump
This commit is contained in:
@@ -16,6 +16,7 @@ namespace OnlyScove.Scripts
|
||||
// One-shot Events
|
||||
public event Action OnJumpEvent; // Space
|
||||
public event Action OnDodgeEvent; // Right Mouse Button (RMB)
|
||||
public event Action OnSprintEvent; // Left Shift
|
||||
public event Action OnAttackEvent; // Left Mouse Button (LMB)
|
||||
public event Action OnCrouchEvent; // C Key
|
||||
public event Action OnInteractEvent; // E Key
|
||||
@@ -53,7 +54,11 @@ namespace OnlyScove.Scripts
|
||||
|
||||
public void OnSprint(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed) IsSprintHeld = true;
|
||||
if (context.performed)
|
||||
{
|
||||
IsSprintHeld = true;
|
||||
OnSprintEvent?.Invoke();
|
||||
}
|
||||
if (context.canceled) IsSprintHeld = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user