feat(奖励系统): 实现等级奖励分发和收集品显示功能
- 新增GameEvent.UpdateCollection事件用于更新收集品显示 - 将CardType枚举移至GameSet并添加getLevelRewardType函数 - 修改MissionComp根据等级分发不同类型奖励事件 - 实现MissionGetsComp收集品数量显示功能 - 在SingletonModuleComp中添加收集品更新事件触发
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user