forked from team-sg/hero-mark-2
added level restart function
This commit is contained in:
parent
18f5b28295
commit
3247a67e96
12 changed files with 206 additions and 40 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue