substantial work on saving and loading and hub mechanic

This commit is contained in:
Derek
2025-02-22 17:09:47 -06:00
parent 777063ddeb
commit 3ee1f261d1
31 changed files with 584 additions and 212 deletions

View File

@@ -1,21 +1,13 @@
extends Area3D
@onready var level_control = get_tree().current_scene
var player_exit = false
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func _ready() -> void:
SignalBus.player_exiting_tree.connect(player_exit_check)
func player_exit_check():
player_exit = true
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_area_exited(area):
pass #level_control.die()
func _on_body_shape_exited(body_rid, body, body_shape_index, local_shape_index):
level_control.die()
func _on_body_exited(body: Node3D) -> void:
if !player_exit:
get_tree().current_scene.die()