main
Loxnebot 2026-03-14 11:43:14 +02:00
parent 4119d7a27c
commit 1e9744384b
1 changed files with 3 additions and 1 deletions

View File

@ -123,7 +123,6 @@ class Player:
self.x = WIDTH
def apply_gravity(self):
self.prev_y = self.y
self.y_velocity += GRAVITY
self.y += self.y_velocity
@ -133,6 +132,9 @@ class Player:
self.y_velocity = 0
self.jumping = False
if self.y < 0:
self.y = 0
self.y_velocity = 0
def update_animation(self):
if self.jumping:
up_thresh = -self.jump_power * 0.4