Compare commits

..

No commits in common. "564a5a664cf3a7767330bd9c472592d4902f68df" and "bec50e645310390a51a0958e228f505e9995ddcf" have entirely different histories.

8 changed files with 3108 additions and 4024 deletions

View File

@ -138,11 +138,12 @@ class Game():
if self.gameloop: # Si j'ai une boucle de jeu, la lancer
self.gameloop.step(self) # La logique de la boucle
self.gameloop.draw(self) # L'affichage de la boucle
self.clock.tick(self.fps)
if self.scene :
self.scene(self)
self.scene = False
pygame.display.update() # Mettre à jour l'affichage
self.clock.tick(self.fps)
def init_inputs(self):

File diff suppressed because it is too large Load Diff

View File

@ -29,8 +29,6 @@ class EndFlag(Ennemy):
self.endtimer = self.game.lib.Timer(0.5)
self.ended = False
self.sfx = self.game.sound_lib["sfx/win.wav"]
def step(self):
super().step()
@ -52,7 +50,6 @@ class EndFlag(Ennemy):
offsetx = self.game.lib.randint(-10*steps,10*steps)/(steps)
offsety = self.game.lib.randint(-5,5)
self.game.addParticle(sprites,self.rect.center[0]+offsetx,self.rect.center[1]+offsety,velx=velx,vely=vely,modvely=0.05,fps=2)
self.sfx.play()
if self.ended:
if self.endtimer.tick(self.game.dt):

View File

@ -88,7 +88,6 @@ class Player(Movable):
self.landsfx = self.game.sound_lib["sfx/land.wav"]
self.slamsfx = self.game.sound_lib["sfx/slam.wav"]
self.jumpsfx = self.game.sound_lib["sfx/jump.wav"]
self.hurtsfx = self.game.sound_lib["sfx/hurt.wav"]
def step(self):
@ -205,8 +204,8 @@ class Player(Movable):
self.verspd= self.jump*self.gravityway
if self.leaptimer<0 and not self.onground:
self.verspd = -abs(self.verspd) # Small leap
self.leaptimer = 1
self.jumpsfx.play()
else:
self.jumpsfx.play()
self.jumped = True
super().step() # Actually move
# Updated hitrect
@ -245,7 +244,7 @@ class Player(Movable):
if self.leaptimer>0:
self.verspd*=self.gravityway
else:
self.leaptimer = 1
self.leaptimer = 0
self.canfastfall = False
self.fastfall = self.gravityway
else:
@ -284,7 +283,6 @@ class Player(Movable):
self.canfastfall = True
if resetcombo:
self.combo = 0
self.hurtsfx.play()
def draw(self):
flipy = (self.gravityway<0 and not self.leaptimer<0)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.