清理 老的 没用的组件

This commit is contained in:
2025-08-14 16:39:06 +08:00
parent f539cf9b7b
commit 6adff46fd1
59 changed files with 2145 additions and 52918 deletions

View File

@@ -7,8 +7,6 @@ import { HeroViewComp } from "./HeroViewComp";
import { BoxSet, FacSet } from "../common/config/BoxSet";
import { HeroInfo, HeroPos, HType } from "../common/config/heroSet";
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
import { FriendModelComp } from "./FriendModel";
import { MasterModelComp } from "./MasterModel";
import { GameEvent } from "../common/config/GameEvent";
import { BuffAttr, getBuffNum, SkillSet } from "../common/config/SkillSet";
import { FightSet } from "../common/config/Mission";
@@ -30,12 +28,8 @@ export class Hero extends ecs.Entity {
destroy(): void {
this.remove(HeroViewComp);
this.remove(HeroModelComp);
if(this.get(FriendModelComp)){
this.remove(FriendModelComp);
}
if(this.get(MasterModelComp)){
this.remove(MasterModelComp);
}
super.destroy();
}
@@ -56,7 +50,6 @@ export class Hero extends ecs.Entity {
// console.log("hero load",pos)
var hv = this.hero_init(uuid,node,info)
this.add(hv);
this.addComponents<ecs.Comp>(MasterModelComp)
oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid})
const move = this.get(BattleMoveComp);
move.direction = 1; // 向右移动