Rebonk sur le plafond
This commit is contained in:
parent
4d89036f66
commit
a1cbe26892
@ -37,6 +37,8 @@ class Player(BaseObject):
|
||||
else:
|
||||
self.vertical+=self.gravity*self.game.dt
|
||||
self.vertical = min(self.maxgravity,self.vertical)
|
||||
if self.checkcollisions(0,-1):
|
||||
self.vertical = max(0,self.vertical) # Se cogne au plafond
|
||||
|
||||
self.jumped = False
|
||||
if self.onground:
|
||||
@ -45,8 +47,6 @@ class Player(BaseObject):
|
||||
self.jumped = True
|
||||
|
||||
self.move(hor*self.speed*self.game.dt,self.vertical*self.game.dt)
|
||||
if self.jumped:
|
||||
print(self.vertical*self.game.dt)
|
||||
|
||||
def getrects(self):
|
||||
result = []
|
||||
|
Loading…
Reference in New Issue
Block a user