refactor(map): 统一使用事件驱动的小提示替代硬编码toast
将多处分散的金币不足、英雄已满等提示逻辑,统一替换为通过GameEvent.ShowSmallTip事件触发的通用小提示组件,替换原有的oops.gui.toast调用,新增通用提示显示逻辑与事件监听
This commit is contained in:
@@ -310,7 +310,7 @@ export class CardComp extends CCComp {
|
||||
// 使用统一经济管理入口消费金币
|
||||
const success = MissionEconomy.spendCoin(cardCost);
|
||||
if (!success) {
|
||||
oops.gui.toast(`金币不足,召唤需要${cardCost}`);
|
||||
oops.message.dispatchEvent(GameEvent.ShowSmallTip, "buy_coin");
|
||||
this.playReboundAnim();
|
||||
mLogger.log(this.debugMode, "CardComp", "use card coin not enough", {
|
||||
uuid: this.cardData.uuid,
|
||||
|
||||
Reference in New Issue
Block a user