From c1ab414aeb095aa04eee877aa996d51513796ce3 Mon Sep 17 00:00:00 2001 From: "theo@manjaro" Date: Wed, 17 Nov 2021 15:16:07 +0100 Subject: [PATCH] Added dust particles --- gamedata/assets/particles/dust/0.png | Bin 0 -> 664 bytes gamedata/assets/particles/dust/1.png | Bin 0 -> 720 bytes gamedata/assets/particles/dust/2.png | Bin 0 -> 725 bytes gamedata/assets/particles/dust/3.png | Bin 0 -> 689 bytes gamedata/assets/particles/dust/4.png | Bin 0 -> 644 bytes gamedata/objects/combat/ennemies/ennemy.py | 5 +++++ gamedata/objects/combat/player.py | 7 ++++++- 7 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 gamedata/assets/particles/dust/0.png create mode 100644 gamedata/assets/particles/dust/1.png create mode 100644 gamedata/assets/particles/dust/2.png create mode 100644 gamedata/assets/particles/dust/3.png create mode 100644 gamedata/assets/particles/dust/4.png diff --git a/gamedata/assets/particles/dust/0.png b/gamedata/assets/particles/dust/0.png new file mode 100644 index 0000000000000000000000000000000000000000..1d08d3f56e9d8c797da9ad05685b4a39abbc92a2 GIT binary patch literal 664 zcmV;J0%!e+P)EX>4Tx04R}tkv&MmKpe$iQ>CI65j%)DWT;LSq>4Cd6^c+H)C#RSm|XfHG-*gu zTpR`0f`cE6RRFEMr!ZQt%yL_XzOyF2=L`&;2=i)x5=kfJi*U4AUlFC!X50 z4bJ<-5mu5_;&b9LlP*a7$aTfzH_kL;k>@Q#C4j(NMZqtkRU=q6&onSMvPXS6botEPx$zUT)#vvg;V+0880*#vEd>=bb;{*sk16O*>U#SDrpQP7X zTJ#9$+XgPKTbi;5TVGd000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{003}FL_t(I%VS^|1&p{P>=e!aBl8d4Kgme6sdkFy|F6%k z{r~mtuK!=(?)raycI|(317Uy}o93BSZVYlkws0|iO?d`85mtuFSAI4;{P469Sv?ar yQ;{{}6T@i$DFCYhkJcR~N{lLjNSkOJVE_Ov3ppgBct2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~eA6ecykQRo3uNqzGVxWkmOu!xxk00000NkvXX Hu0mjfLLe@= literal 0 HcmV?d00001 diff --git a/gamedata/assets/particles/dust/3.png b/gamedata/assets/particles/dust/3.png new file mode 100644 index 0000000000000000000000000000000000000000..71b39e7ddf2c5c9a53f6a1857dada9893e07bfdd GIT binary patch literal 689 zcmV;i0#5yjP)EX>4Tx04R}tkv&MmKpe$iQ>CI65j%)DWT;LSq>4Cd6^c+H)C#RSm|XfHG-*gu zTpR`0f`cE6RRFEMr!ZQt%yL_XzOyF2=L`&;2=i)x5=kfJi*U4AUlFC!X50 z4bJ<-5mu5_;&b9LlP*a7$aTfzH_kL;k>@Q#C4j(NMZqtkRU=q6&onSMvPXS6botEPx$zUT)#vvg;V+0880*#vEd>=bb;{*sk16O*>U#SDrpQP7X zTJ#9$+XgPKTbi;5TVGd000McNlirune02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{004%TsGeZXCxhllU1)K}iq3I-8ZPO#DOX2y#>(7Bnfv(o*j1nUNN=MxH6;R2H6;SjH6;Sj|1Z%B XPmpt^Snka#00000NkvXXu0mjfC$=1B literal 0 HcmV?d00001 diff --git a/gamedata/assets/particles/dust/4.png b/gamedata/assets/particles/dust/4.png new file mode 100644 index 0000000000000000000000000000000000000000..3fe0fe6e737b3542ab49e3fb098e1508bf6610b6 GIT binary patch literal 644 zcmV-~0(EX>4Tx04R}tkv&MmKpe$iQ>CI65j%)DWT;LSq>4Cd6^c+H)C#RSm|XfHG-*gu zTpR`0f`cE6RRFEMr!ZQt%yL_XzOyF2=L`&;2=i)x5=kfJi*U4AUlFC!X50 z4bJ<-5mu5_;&b9LlP*a7$aTfzH_kL;k>@Q#C4j(NMZqtkRU=q6&onSMvPXS6botEPx$zUT)#vvg;V+0880*#vEd>=bb;{*sk16O*>U#SDrpQP7X zTJ#9$+XgPKTbi;5TVGd000McNlirueSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{003M`L_t(I%VS`G0y{uc8cczcl2-hzoUN( zQHCH}#zKx|Re7}#&ZOr5EDQ_`42SNYWMr7s{2$JyHJ~WGM!}$r7D|#a$w?VK86UcT el96S=lQ96Pc|WAzzBOq80000self.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: