Player death animation
This commit is contained in:
parent
a974acd908
commit
5ac48ac733
@ -312,6 +312,8 @@ class Player(Movable):
|
|||||||
t = Transition(self.game,time=1,holdtime=0.5,level=self.game.globals["levelname"])
|
t = Transition(self.game,time=1,holdtime=0.5,level=self.game.globals["levelname"])
|
||||||
self.game.gameloop.summon(t)
|
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):
|
def draw(self):
|
||||||
if not self.dead:
|
if not self.dead:
|
||||||
flipy = (self.gravityway<0 and not self.leaptimer<0)
|
flipy = (self.gravityway<0 and not self.leaptimer<0)
|
||||||
|
@ -5,7 +5,7 @@ class Water(BaseObject):
|
|||||||
def __init__(self,game):
|
def __init__(self,game):
|
||||||
|
|
||||||
self.tileset = game.gameloop.findname("TilesetRenderer")[0]
|
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
|
self.destinationy = y
|
||||||
|
|
||||||
super().__init__(0,y,game,game.globals["cameraw"],game.globals["camerah"])
|
super().__init__(0,y,game,game.globals["cameraw"],game.globals["camerah"])
|
||||||
|
Loading…
Reference in New Issue
Block a user