feat: move sceneEntrance to a separate node/scene; add new dungeonScene with moving back to the previous scene; add class_name to Player;
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
extends Area2D
|
||||
|
||||
@export var next_scene: String
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
@@ -11,8 +11,9 @@ func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
|
||||
func _on_body_entered(body) -> void:
|
||||
func _on_body_entered(body: Player) -> void:
|
||||
print("body entered!")
|
||||
get_tree().change_scene_to_file.call_deferred(next_scene)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user