1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-09 13:17:12 +08:00

feat(UI): 为提示框添加类型支持并改进样式

- 新增MessageType枚举定义提示类型(INFO/WARNING/ERROR)
- 根据不同类型显示不同颜色样式
- 修改所有调用showTip的地方使用新的类型参数
- 移除自动销毁时间参数,统一使用固定显示时长
This commit is contained in:
2026-01-25 21:40:26 +08:00
parent 846458060c
commit 06c2637ebb
5 changed files with 33 additions and 15 deletions
+2 -2
View File
@@ -109,7 +109,7 @@ static func next(waves: Array):
wave = instance_from_id(wave.get_instance_id())
EntityBase.generate(ComponentManager.getCharacter(wave.entity), wave.entityPosition, true, wave.isBoss)
current += 1
UIState.showTip("%d波开始!" % current, 500)
UIState.showTip("%d波开始!" % current, TipBox.MessageType.INFO)
showNextBossReminder()
static func showNextBossReminder():
var nextBossInfo = getNextBossInfo()
@@ -117,7 +117,7 @@ static func showNextBossReminder():
var bossName = nextBossInfo[0]
var wavesLeft = nextBossInfo[1]
if wavesLeft > 0:
UIState.showTip("Boss [b]%s[/b] 将在[b]%d[/b]波后到来!" % [bossName, wavesLeft], 500)
UIState.showTip("Boss [b]%s[/b] 将在[b]%d[/b]波后到来!" % [bossName, wavesLeft], TipBox.MessageType.WARNING)
static func startWith(wave: int):
return wave - 1