TestGame/assets/levels/transition.gd
2024-12-31 05:19:57 +01:00

18 lines
410 B
GDScript

extends Node3D
@export var to_: String = "debug1"
func _ready() -> void:
pass
func _process(delta: float) -> void:
pass
func _on_area_3d_area_entered(area: Area3D) -> void:
if "Player" in area.get_groups():
print("Player stepped on transition to " + str(to_))
if not to_:
print_debug("No scene specified in transition" + str(self))
print(to_)
Messagebus.CHANGE_SCENE.emit(to_)