added level restart function

This commit is contained in:
pennyrigate 2023-01-16 03:19:06 -05:00
parent 18f5b28295
commit 3247a67e96
12 changed files with 206 additions and 40 deletions

View file

@ -253,15 +253,7 @@ func die():
Game.lives -= 1
Game.play_sound(Game.a_die,Game.ac_die)
if Game.lives < 0:
if Game.score > Game.high_score: Game.high_score = Game.score
Game.score = 0
Game.golds = 0
Game.stars = [false,false,false,false,false]
Game.shards = 0
Game.arrows = 0
Game.lives = 2
Game.ac_climb.stop()
Game.change_map(load(get_owner().filename))
Game.restart_level()
func _on_AnimationPlayer_animation_finished(anim_name):