Compare commits
2 Commits
f278ea73b0
...
5ac48ac733
Author | SHA1 | Date |
---|---|---|
theo@manjaro | 5ac48ac733 | |
theo@manjaro | a974acd908 |
|
@ -218,6 +218,8 @@ class Player(Movable):
|
|||
super().step() # Actually move
|
||||
if self.rect.center[1]>self.game.globals["cameray"]+self.game.globals["camerah"]:
|
||||
self.die()
|
||||
self.game.globals["scamerax"] = 4
|
||||
self.game.globals["scameray"] = 4
|
||||
# Updated hitrect
|
||||
self.hitrect[0] = self.rect.center[0]-self.hitrect[2]/2
|
||||
offset = 0
|
||||
|
@ -291,6 +293,8 @@ class Player(Movable):
|
|||
self.horkb = hor
|
||||
self.verkb = ver
|
||||
self.canfastfall = True
|
||||
self.game.globals["scamerax"] = 4
|
||||
self.game.globals["scameray"] = 4
|
||||
if resetcombo:
|
||||
self.combo = 0
|
||||
self.hurtsfx.play()
|
||||
|
@ -308,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)
|
||||
|
|
|
@ -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"])
|
||||
|
|
Loading…
Reference in New Issue