This commit is contained in:
2025-04-13 14:40:41 +08:00
parent 2201147ccc
commit a1e71a6a79
20 changed files with 1738 additions and 1794 deletions

12
components/toast.gd Normal file
View File

@@ -0,0 +1,12 @@
# toast.gd
extends Node
const ToastScene = preload("res://components/ToastShow.tscn")
static func show(text: String,
color: Color = Color.WHITE,
duration: float = 3.0,
fade: float = 1.0) -> void:
var toast = ToastScene.instantiate()
# 延迟设置参数确保节点初始化完成
toast.call_deferred("setup", text, color, duration, fade)