feat: 添加卡牌使用组件并集成至卡牌系统
- 新增 CardUseComp 组件,用于处理卡牌使用逻辑和效果分发 - 在 CardComp 中集成 CardUseComp,卡牌使用时触发效果事件 - 修改 MissionCardComp,任务开始时自动发牌至槽位 - 更新预制体资源,修复卡牌 UI 节点引用
This commit is contained in:
@@ -55,7 +55,7 @@ export class MissionCardComp extends CCComp {
|
||||
this.onMissionStart();
|
||||
}
|
||||
|
||||
/** 任务开始时:重置卡池等级、清空4槽、显示面板 */
|
||||
/** 任务开始时:重置卡池等级、清空4槽、显示面板 刷新一次卡池*/
|
||||
onMissionStart() {
|
||||
this.poolLv = CARD_POOL_INIT_LEVEL;
|
||||
this.layoutCardSlots();
|
||||
@@ -65,6 +65,8 @@ export class MissionCardComp extends CCComp {
|
||||
}
|
||||
this.updatePoolLvUI();
|
||||
this.node.active = true;
|
||||
const cards = this.buildDrawCards();
|
||||
this.dispatchCardsToSlots(cards);
|
||||
mLogger.log(this.debugMode, "MissionCardComp", "mission start", {
|
||||
poolLv: this.poolLv
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user