Camera shake on death/hit
This commit is contained in:
parent
f278ea73b0
commit
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()
|
||||
|
Loading…
Reference in New Issue
Block a user