atualização 1.0/add menu

This commit is contained in:
2026-05-27 09:44:13 -03:00
parent 0b0113fbde
commit b8442324fa
9 changed files with 125 additions and 59 deletions
+3 -7
View File
@@ -86,10 +86,11 @@ func handle_animations():
if !is_on_floor() and gravity > 2:
animator.play("Fall", 0.3)
else:
animator.play("Dead", 03)
animator.play("Dead", 0.3)
await animator.animation_finished
get_parent().get_node("Game_over").visible = true
get_tree().paused = true
get_parent().get_node("Game_over").visible = true
func apply_gravity(delta):
if not is_on_floor():
gravity += 25 * delta
@@ -124,8 +125,3 @@ func collect_coin():
func damage_player(amount: int):
health -= amount
verfy_life()
func _on_foot_area_entered(area: Area3D) -> void:
if area.name == "damagem_box" :
area.damage(foot_damage)
+11
View File
@@ -0,0 +1,11 @@
extends CanvasLayer
var Play = preload("res://prefabs/Telas/Debug/test_debug.tscn")
func _on_play_pressed() -> void: #button Play
get_tree().change_scene_to_packed(Play)
# Replace with function body.
func _on_quit_game_pressed() -> void:#button Quit
get_tree().quit()
# Replace with function body.
+1
View File
@@ -0,0 +1 @@
uid://chlo44qqf1jxt
+11
View File
@@ -1,5 +1,6 @@
extends CanvasLayer
const Menu = preload ("res://prefabs/Telas/menu_inicial.tscn")
func _on_retry_button_pressed() -> void: # Retry_button
print("retry pressionado")
@@ -16,3 +17,13 @@ func _on_continued_button_pressed() -> void:#continued
print("continued pressionado")
get_tree().paused = false
get_parent().get_node("Pause").visible = false
func _on_menu_pressed() -> void:# button menu
get_tree().paused = false
get_tree().change_scene_to_file("res://prefabs/Telas/menu_inicial.tscn")
print("carregou")
# Replace with function body.