This commit is contained in:
2024-11-13 08:14:10 +08:00
parent 220f595ff6
commit 3f8cf727d9
16 changed files with 1680 additions and 106 deletions

View File

@@ -59,11 +59,7 @@ export class Hero extends ecs.Entity {
var prefab: Prefab = oops.res.get(path, Prefab)!;
var node = instantiate(prefab);
node.parent=layer
// var as = node.getComponent(HeroSpine);
// let ratio=this.set_ratio(uuid);
// node.setScale(node.scale.x*scale*ratio, node.scale.y*ratio, 0);
// pos.x=smc.Role.RoleView.node.position.x+pos.x;
// pos.y=smc.Role.RoleView.node.position.y+pos.y;
node.setPosition(pos)
this.hero_init(uuid,node,index,scale,box_group)
oops.message.dispatchEvent("hero_load",this)
@@ -88,12 +84,12 @@ export class Hero extends ecs.Entity {
hv.max_skill_uuid = hero_set.max_skill_uuid;
hv.role_heros_index = index;
hv.type = hero_set.type;
hv.hp= hv.hp_max =Math.floor(hero_set.hp*(1+talents[1011].bonus*role_talent[1011].lv)*smc.vm_data.mission.hero.hp);
hv.atk = Math.floor(hero_set.atk*(1+talents[1012].bonus*role_talent[1012].lv))
hv.atk_cd = hero_set.atk_cd*(1-talents[1013].bonus*role_talent[1013].lv);
hv.st_boncus=1+talents[1015].bonus*role_talent[1015].lv;
hv.s_boncus=1+talents[1016].bonus*role_talent[1016].lv;
hv.power_max= hero_set.power_max*(1-talents[1014].bonus*role_talent[1014].lv);;
hv.hp= hv.hp_max =hero_set.hp;
hv.atk = hero_set.atk;
hv.atk_cd = hero_set.atk_cd
hv.st_boncus=1
hv.s_boncus=1
hv.power_max= hero_set.power_max
this.add(hv);
}
set_ratio(uuid:number){