1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00
Files
Dog-Lynx-And-HCN/scripts/Statemachine/TipBox.gd
T
fallingshrimp ac77e3d581 feat(UI): 改进提示框功能并添加Boss提醒
- 将TipBox的Label改为RichTextLabel以支持富文本
- 添加主题文件支持多种字体样式
- 修改showTip方法支持自定义显示时长
- 添加Boss波次提醒功能
- 调整TipBox场景的布局和样式
2026-01-24 20:07:06 +08:00

25 lines
522 B
GDScript

@tool
extends PanelContainer
class_name TipBox
@export var text: String = "nothing"
@onready var label: RichTextLabel = $%label
@onready var animator: AnimationPlayer = $%animator
func _ready():
label.text = text
animator.play("show")
func _process(_delta):
label.text = text
func destroy():
animator.play("hide")
await animator.animation_finished
queue_free()
static func create(applyText: String) -> TipBox:
var box = ComponentManager.getUIComponent("TipBox").instantiate()
box.text = applyText
return box