game overing now calls change_map() on the same map

This commit is contained in:
pennyrigate 2023-01-07 14:31:14 -05:00
parent 56d03ac23d
commit 77a7430e21

View file

@ -74,6 +74,8 @@ func _physics_process(delta):
velocity.y = 0
#Apply velocity
move_and_slide(velocity,Vector2.UP)
Debug.print(get_owner().filename)
func _process_idle():
if anims.get_current_animation() != "idle": anims.play("idle")
@ -251,7 +253,7 @@ func die():
Game.arrows = 0
Game.lives = 2
Game.ac_climb.stop()
Game.change_map(load("res://maps/map01.tscn"))
Game.change_map(load(get_owner().filename))
func _on_AnimationPlayer_animation_finished(anim_name):