Double Tap pour Fastfall si on tombe d'un semi
This commit is contained in:
parent
b8285755ae
commit
63b10f7aad
@ -56,12 +56,15 @@ class Player(Movable):
|
|||||||
|
|
||||||
# Je passe en dessous des semi-plateformes
|
# Je passe en dessous des semi-plateformes
|
||||||
if keys["down"]["timer"]==1:
|
if keys["down"]["timer"]==1:
|
||||||
|
falled = False
|
||||||
if not self.checkcollisions(0,1,semi=False):
|
if not self.checkcollisions(0,1,semi=False):
|
||||||
semi = self.checkcollisions(0,1,classic=False)
|
semi = self.checkcollisions(0,1,classic=False)
|
||||||
if semi!=self.checkcollisions(0,0,classic=False) and semi:
|
if semi!=self.checkcollisions(0,0,classic=False) and semi:
|
||||||
self.rect.bottom = semi.top+1
|
self.rect.bottom = semi.top+1
|
||||||
if 0<self.verspd <= self.fastfallmargin or (abs(self.verspd)<abs(self.currentspdv) and abs(self.verspd)<=self.fastfallmargin/1.8):
|
falled = True
|
||||||
self.verspd = self.maxgravity/4
|
if not falled:
|
||||||
|
if 0<self.verspd <= self.fastfallmargin or (abs(self.verspd)<abs(self.currentspdv) and abs(self.verspd)<=self.fastfallmargin/1.8):
|
||||||
|
self.verspd = self.maxgravity/4
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if self.hitposetimer.tick(self.game.dt):
|
if self.hitposetimer.tick(self.game.dt):
|
||||||
|
Loading…
Reference in New Issue
Block a user