Stealth Cymbal #3
@@ -10,6 +10,14 @@ var is_cursor_locked: bool = false # When true, hourglass is shown and cursor c
|
|||||||
func get_scene() -> Scene:
|
func get_scene() -> Scene:
|
||||||
return $SceneViewport/background
|
return $SceneViewport/background
|
||||||
|
|
||||||
|
func get_current_room_name() -> String:
|
||||||
|
var scene = get_scene()
|
||||||
|
if scene and scene.get_script():
|
||||||
|
var script_path = scene.get_script().resource_path
|
||||||
|
if script_path.begins_with("res://scenes/"):
|
||||||
|
return script_path.trim_suffix(".gd").get_file()
|
||||||
|
return ""
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
# get_scene().connect("transitioned", Callable($SceneViewport/label, "_on_transitioned"))
|
# get_scene().connect("transitioned", Callable($SceneViewport/label, "_on_transitioned"))
|
||||||
|
|||||||
Reference in New Issue
Block a user