UnityBiz/Assets/scripts/Movement/PlayerMovementController.Jump.cs

15 lines
338 B
C#
Raw Normal View History

2024-08-02 04:41:41 +00:00
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);
}
}
}