This commit is contained in:
Booklordofthedings 2024-08-18 11:02:15 +02:00
parent abb54d45ca
commit 6a9a99389c
8 changed files with 39 additions and 4 deletions

View file

@ -54,6 +54,12 @@ func _physics_process(delta):
get_input(delta)
velocity.y += gravity
move_and_slide()
if(get_slide_collision_count() > 0):
for i in get_slide_collision_count():
var box = get_slide_collision(i).get_collider() as Box
if box and velocity.y >= 0:
box.velocity.x = velocity.x*0.8
# print(jump_count) # Uncomment for debugging
func Jump():