Added splash effects

This commit is contained in:
theo@manjaro 2021-11-17 22:00:13 +01:00
parent b09d747efe
commit b6af2d4287
5 changed files with 4 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

View File

@ -33,6 +33,7 @@ class Player(Movable):
self.canhit = False
self.dustparticles = game.getSpriteDir("particles/dust/")
self.splashparticles = game.getSpriteDir("particles/splash/")
self.speed = 200
@ -79,6 +80,9 @@ class Player(Movable):
# Décellerer
self.canfastfall = False
self.verspd *= 0.9
# Spawn splash particles
self.game.addParticle(self.splashparticles,self.rect.left-5,self.water.rect.top-5,fps=8)
self.game.addParticle(self.splashparticles,self.rect.right+5,self.water.rect.top-5,flipx=True,fps=8)
else:
if self.gravityway == -1:
self.gravityway = 1