fixed multiple death bug
This commit is contained in:
parent
eaa99f7e74
commit
e541e6ea5e
1 changed files with 2 additions and 1 deletions
|
@ -297,6 +297,8 @@ func die():
|
||||||
new_particles.global_position = global_position
|
new_particles.global_position = global_position
|
||||||
new_particles.emitting = true
|
new_particles.emitting = true
|
||||||
sprite.visible = false
|
sprite.visible = false
|
||||||
|
current_state = State.INACTIVE
|
||||||
|
position = Game.respawn_point
|
||||||
Game.lives -= 1
|
Game.lives -= 1
|
||||||
if Game.lives < 0:
|
if Game.lives < 0:
|
||||||
new_particles.amount = 64
|
new_particles.amount = 64
|
||||||
|
@ -313,7 +315,6 @@ func die():
|
||||||
else:
|
else:
|
||||||
Game.play_sound(Game.a_die, Game.ac_die)
|
Game.play_sound(Game.a_die, Game.ac_die)
|
||||||
yield(Game.freeze_frame(0.3), "timeout")
|
yield(Game.freeze_frame(0.3), "timeout")
|
||||||
position = Game.respawn_point
|
|
||||||
current_state = State.IDLE
|
current_state = State.IDLE
|
||||||
sprite.visible = true
|
sprite.visible = true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue