update
This commit is contained in:
@@ -7,7 +7,7 @@ var active := false
|
||||
|
||||
func _ready() -> void:
|
||||
if not is_exit:
|
||||
if GameState.dungeon_cleared:
|
||||
if PlayerData.dungeon_cleared:
|
||||
queue_free()
|
||||
return
|
||||
get_tree().create_timer(0.5).timeout.connect(_check_overlapping)
|
||||
@@ -23,11 +23,11 @@ func _on_gate_area_body_entered(body: Node3D) -> void:
|
||||
if not active:
|
||||
return
|
||||
if body is CharacterBody3D and body.name == "Player":
|
||||
GameState.save_player(body)
|
||||
PlayerData.save_cache()
|
||||
if is_exit:
|
||||
GameState.returning_from_dungeon = true
|
||||
PlayerData.returning_from_dungeon = true
|
||||
else:
|
||||
GameState.portal_position = global_position
|
||||
PlayerData.portal_position = global_position
|
||||
call_deferred("_change_scene")
|
||||
|
||||
func _change_scene() -> void:
|
||||
|
||||
Reference in New Issue
Block a user