升级初步完成

This commit is contained in:
panw
2024-12-06 16:34:17 +08:00
parent 4bac3c6d86
commit a968281bdc
9 changed files with 54 additions and 67 deletions

View File

@@ -54,7 +54,7 @@ export class Hero extends ecs.Entity {
this.addComponents<ecs.Comp>( MonModelComp);
}
var path = "game/heros/"+smc.heros[uuid].path;
var path = "game/heros/"+HeroInfo[uuid].path;
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
@@ -69,9 +69,9 @@ export class Hero extends ecs.Entity {
hero_init(uuid:number=1001,node:Node,scale:number=1,box_group=BoxSet.HERO){
var hv = node.getComponent(HeroViewComp)!;
// console.log("hero_init",buff)
let HInf= smc.heros[uuid] // 角色数据
let HInf= HeroInfo[uuid] // 角色数据
let talent= smc.vmdata.talent
let hero =smc.vmdata.heros[uuid]
let hero =smc.heros[uuid]
let talents=Talents;
hv.scale = scale;
hv.box_group = box_group;
@@ -112,7 +112,7 @@ export class Hero extends ecs.Entity {
}
set_ratio(uuid:number){
let ratio=1;
switch (smc.heros[uuid].level) {
switch (HeroInfo[uuid].level) {
case 2:
ratio=1.05
break;