feat: main menu after death

This commit is contained in:
newt 2024-08-18 18:44:09 +01:00
parent d442525fe5
commit 2c7b9c1efd
3 changed files with 3 additions and 4 deletions

View file

@ -263,9 +263,7 @@ script = ExtResource("1_dcux3")
texture_filter = 1
position = Vector2(-34, 0)
sprite_frames = SubResource("SpriteFrames_e3bx4")
animation = &"Whip"
frame = 4
frame_progress = 0.768581
animation = &"jump away"
metadata/_aseprite_wizard_config_ = {
"layer": "",
"o_ex_p": "",

View file

@ -209,6 +209,7 @@ shape = SubResource("CircleShape2D_kpyhc")
debug_color = Color(0.972226, 0, 0.442516, 0.42)
[node name="AttackTimer" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
[node name="DeathTimer" type="Timer" parent="."]

View file

@ -99,7 +99,7 @@ func _process(delta: float) -> void:
# Reset to start on death
if death_timer.is_stopped():
get_tree().change_scene_to_file("res://levels/level1/stage1.tscn")
get_tree().change_scene_to_file("res://MainMenu.tscn")
if attack_timer.is_stopped() and Input.is_action_just_pressed("attack"):
attack_timer.start()