immersive-home/app/lib/globals/console.gd

18 lines
339 B
GDScript3
Raw Normal View History

2024-03-21 11:51:28 +02:00
extends Node
const console_scene = preload ("res://content/ui/console.tscn")
2024-04-30 20:18:49 +03:00
@onready var main = $"/root/Main"
@onready var console = $"/root/Main/Console"
2024-03-21 11:51:28 +02:00
func _ready():
2024-04-30 20:18:49 +03:00
await main.ready
2024-04-11 17:51:30 +03:00
2024-04-30 20:18:49 +03:00
main.remove_child(console)
2024-03-21 11:51:28 +02:00
func log(message):
2024-04-30 20:18:49 +03:00
print(message)
if console.get_parent() == null:
main.add_child(console)
2024-03-21 11:51:28 +02:00
2024-04-30 20:18:49 +03:00
console.log(message)