private void Start()
{
JumpPhysics();
}
private void Update()
{
CollisionCheck();
if (isGrounded)
velocity.y = 0f;
else
velocity.y += gravity * Time.deltaTime;
moveInput = GetInput().x;
if (Input.GetKeyDown(KeyCode.Space) && isGrounded)
velocity.y = jumpVelocity;
velocity.x = movement.speed * moveInput;
Move(velocity * Time.deltaTime);
}