diff --git a/gamedata/assets/particles/dust/0.png b/gamedata/assets/particles/dust/0.png new file mode 100644 index 0000000..1d08d3f Binary files /dev/null and b/gamedata/assets/particles/dust/0.png differ diff --git a/gamedata/assets/particles/dust/1.png b/gamedata/assets/particles/dust/1.png new file mode 100644 index 0000000..d4f6aa5 Binary files /dev/null and b/gamedata/assets/particles/dust/1.png differ diff --git a/gamedata/assets/particles/dust/2.png b/gamedata/assets/particles/dust/2.png new file mode 100644 index 0000000..1f33d28 Binary files /dev/null and b/gamedata/assets/particles/dust/2.png differ diff --git a/gamedata/assets/particles/dust/3.png b/gamedata/assets/particles/dust/3.png new file mode 100644 index 0000000..71b39e7 Binary files /dev/null and b/gamedata/assets/particles/dust/3.png differ diff --git a/gamedata/assets/particles/dust/4.png b/gamedata/assets/particles/dust/4.png new file mode 100644 index 0000000..3fe0fe6 Binary files /dev/null and b/gamedata/assets/particles/dust/4.png differ diff --git a/gamedata/objects/combat/ennemies/ennemy.py b/gamedata/objects/combat/ennemies/ennemy.py index c122e16..1065b91 100644 --- a/gamedata/objects/combat/ennemies/ennemy.py +++ b/gamedata/objects/combat/ennemies/ennemy.py @@ -8,6 +8,8 @@ class Ennemy(Movable): self.player = None + self.dustparticles = game.getSpriteDir("particles/dust/") + def step(self): super().step() @@ -19,6 +21,9 @@ class Ennemy(Movable): if self.rect.colliderect(self.player.hitrect): # Die self.game.gameloop.delid(self.id) + + # Add particles + self.game.addParticle(self.dustparticles,self.rect.center[0],self.rect.center[1]) # Boost the player vertically if not self.player.fastfall: if self.player.rect[1]>self.rect[1]: diff --git a/gamedata/objects/combat/player.py b/gamedata/objects/combat/player.py index 07aeb7d..f035a69 100644 --- a/gamedata/objects/combat/player.py +++ b/gamedata/objects/combat/player.py @@ -20,6 +20,8 @@ class Player(Movable): self.hitrect[3] = round(self.hitrect[3]*0.7) self.canhit = False + self.dustparticles = game.getSpriteDir("particles/dust/") + self.speed = 200 self.controlled = True @@ -91,7 +93,10 @@ class Player(Movable): self.onground = True self.candash = True self.canfastfall = True - self.fastfall = False + if self.fastfall: + self.fastfall = False + # Spawns dust + self.game.addParticle(self.dustparticles,self.rect.center[0],self.rect.bottom,fps=25) if self.gravityway > 0: self.verspd=min(0,self.verspd) else: