mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-09 13:17:12 +08:00
feat(UI): 添加波次开始提示并优化提示框功能
- 在Wave.gd中添加波次开始时的UI提示 - 调整UI.tscn中提示框的布局和位置 - 修复TipBox.gd中实例化组件的错误 - 修改UIState.gd中提示框的显示逻辑,支持自动销毁
This commit is contained in:
@@ -8,17 +8,17 @@ class_name TipBox
|
||||
@onready var animator: AnimationPlayer = $%animator
|
||||
|
||||
func _ready():
|
||||
label.text = text
|
||||
animator.play("show")
|
||||
label.text = text
|
||||
animator.play("show")
|
||||
func _process(_delta):
|
||||
label.text = text
|
||||
label.text = text
|
||||
|
||||
func destroy():
|
||||
animator.play("hide")
|
||||
await animator.animation_finished
|
||||
queue_free()
|
||||
animator.play("hide")
|
||||
await animator.animation_finished
|
||||
queue_free()
|
||||
|
||||
static func create(applyText: String) -> TipBox:
|
||||
var box = ComponentManager.getUIComponent("TipBox")
|
||||
box.text = applyText
|
||||
return box
|
||||
var box = ComponentManager.getUIComponent("TipBox").instantiate()
|
||||
box.text = applyText
|
||||
return box
|
||||
|
||||
Reference in New Issue
Block a user