feat(英雄系统): 实现英雄升级和经验系统
- 在 HeroViewComp 中扩展怪物死亡事件数据,包含等级和类型信息 - 在 SingletonModuleComp 中实现完整的经验计算和升级逻辑 - 在 MissionComp 中添加经验获取和升级事件处理 - 在 RogueConfig 中添加经验计算公式和怪物经验配置 - 添加等级同步机制防止ECS数据覆盖
This commit is contained in:
@@ -404,7 +404,10 @@ export class HeroViewComp extends CCComp {
|
||||
// 根据阵营触发不同事件
|
||||
if(this.model.fac === FacSet.MON){
|
||||
oops.message.dispatchEvent(GameEvent.MonDead, {
|
||||
hero_uuid: this.model.hero_uuid,
|
||||
uuid: this.model.hero_uuid,
|
||||
lv: this.model.lv,
|
||||
is_boss: this.model.is_boss,
|
||||
is_elite: this.model.is_big_boss, // 暂时映射 is_big_boss 为 elite,或者由 MissionComp 二次判断
|
||||
position: this.node.position
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user