feat(奖励系统): 实现等级奖励分发和收集品显示功能

- 新增GameEvent.UpdateCollection事件用于更新收集品显示
- 将CardType枚举移至GameSet并添加getLevelRewardType函数
- 修改MissionComp根据等级分发不同类型奖励事件
- 实现MissionGetsComp收集品数量显示功能
- 在SingletonModuleComp中添加收集品更新事件触发
This commit is contained in:
walkpan
2026-01-05 20:06:23 +08:00
parent 93e0ab083b
commit 9bf8ad2625
7 changed files with 121 additions and 154 deletions

View File

@@ -179,6 +179,7 @@ export class SingletonModuleComp extends ecs.Comp {
}
this.vmdata.collection.talents[id]++;
console.log(`[SMC] 记录天赋获取: ID=${id}, 次数=${this.vmdata.collection.talents[id]}`);
oops.message.dispatchEvent(GameEvent.UpdateCollection);
}
/**
@@ -191,6 +192,7 @@ export class SingletonModuleComp extends ecs.Comp {
}
this.vmdata.collection.skill.count++;
console.log(`[SMC] 记录技能获取: ID=${id}, 次数=${this.vmdata.collection.skill.count}`);
oops.message.dispatchEvent(GameEvent.UpdateCollection);
}
/**
* 记录好友获取
@@ -202,6 +204,7 @@ export class SingletonModuleComp extends ecs.Comp {
}
this.vmdata.collection.friend.count++;
console.log(`[SMC] 记录好友获取: ID=${id}, 次数=${this.vmdata.collection.friend.count}`);
oops.message.dispatchEvent(GameEvent.UpdateCollection);
}
vmAdd() {