monter 和hero Entity 分开
This commit is contained in:
@@ -25,6 +25,7 @@ import { HCardComp } from "./HCardComp";
|
||||
import { VictoryComp } from "./VictoryComp";
|
||||
import { ItemComp } from "./ItemComp";
|
||||
import { MSkillComp } from "./MSkillComp";
|
||||
import { Monster } from "../hero/Mon";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
/** 视图层对象 */
|
||||
@@ -232,11 +233,11 @@ export class MissionComp extends CCComp {
|
||||
hero.load(pos,scale,uuid);
|
||||
}
|
||||
private addMonster(uuid:number=1001,i:number=0) {
|
||||
let monster = ecs.getEntity<Hero>(Hero);
|
||||
let mon = ecs.getEntity<Monster>(Monster);
|
||||
let scale = -1
|
||||
let pos:Vec3 = v3(-1*HeroSet.StartPos[HeroInfo[uuid].type]+i*15,BoxSet.GAME_LINE);
|
||||
console.log("addMonster:",pos)
|
||||
monster.load(pos,scale,uuid,false);
|
||||
mon.load(pos,scale,uuid,false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user