challenge-editor/autoload/toast/script/toast_root.gd

12 lines
298 B
GDScript3
Raw Normal View History

2024-11-18 11:13:00 +08:00
extends CanvasLayer
@onready var toast_tscn=preload("res://autoload/toast/tscn/toast.tscn")
# Called when the node enters the scene tree for the first time.
func popup(str:String):
var new_toast=toast_tscn.instantiate()
$pos/VBoxContainer.add_child(new_toast)
new_toast.set_text(str)
pass