15 lines
338 B
C#
15 lines
338 B
C#
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
|
|
namespace Player.Movement
|
|
{
|
|
public partial class PlayerMovementController
|
|
{
|
|
private void Jump(InputAction.CallbackContext ctx)
|
|
{
|
|
if (!IsGrounded) return;
|
|
_rigidbody.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
|
|
}
|
|
}
|
|
}
|