This commit is contained in:
panfudan
2025-06-17 00:00:56 +08:00
parent 843d03ac20
commit 3ad905cd59
5 changed files with 83 additions and 17 deletions

View File

@@ -8,6 +8,7 @@ import { BoxSet, FacSet } from "../common/config/BoxSet";
import { HeroInfo } from "../common/config/heroSet";
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { SkillConComp } from "./SkillConComp";
import { FriendModelComp } from "./FriendModel";
/** 角色实体 */
@ecs.register(`Hero`)
@@ -72,6 +73,7 @@ export class Hero extends ecs.Entity {
node.parent = scene.entityLayer!.node!
node.setPosition(pos)
// console.log("hero load",pos)
this.addComponents<ecs.Comp>(FriendModelComp);
var hv = node.getComponent(HeroViewComp)!;
let hero= HeroInfo[uuid] // 共用英雄数据
hv.scale = scale;