Player death animation

This commit is contained in:
theo@manjaro 2021-11-24 07:54:47 +01:00
parent a974acd908
commit 5ac48ac733
2 changed files with 3 additions and 1 deletions

View File

@ -312,6 +312,8 @@ class Player(Movable):
t = Transition(self.game,time=1,holdtime=0.5,level=self.game.globals["levelname"])
self.game.gameloop.summon(t)
self.game.addParticle([self.spritehurt],self.rect.center[0],self.rect.center[1],fps=0.6,vely=-1.5,modvely=0.15) # Die sprite
def draw(self):
if not self.dead:
flipy = (self.gravityway<0 and not self.leaptimer<0)

View File

@ -5,7 +5,7 @@ class Water(BaseObject):
def __init__(self,game):
self.tileset = game.gameloop.findname("TilesetRenderer")[0]
y = self.tileset.spawns[0].center[1]+game.globals["camerah"]/2
y = self.tileset.layers[0]["surface"].get_height()+8
self.destinationy = y
super().__init__(0,y,game,game.globals["cameraw"],game.globals["camerah"])