dd
This commit is contained in:
@@ -10,6 +10,7 @@ import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
|
||||
import { SkillConComp } from "./SkillConComp";
|
||||
import { FriendModelComp } from "./FriendModel";
|
||||
import { MasterModelComp } from "./MasterModel";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
/** 角色实体 */
|
||||
@ecs.register(`Hero`)
|
||||
|
||||
@@ -52,7 +53,7 @@ export class Hero extends ecs.Entity {
|
||||
hv.lv=1
|
||||
this.add(hv);
|
||||
this.addComponents<ecs.Comp>(MasterModelComp)
|
||||
console.log("[Hero]:master",hv)
|
||||
oops.message.dispatchEvent(GameEvent.MasterCalled,{uuid:uuid})
|
||||
|
||||
}
|
||||
/** 加载角色 */
|
||||
@@ -75,9 +76,7 @@ export class Hero extends ecs.Entity {
|
||||
// const move = this.get(BattleMoveComp);
|
||||
// move.direction = 1; // 向右移动
|
||||
// move.targetX = 800; // 右边界'
|
||||
oops.message.dispatchEvent("hero_load",this)
|
||||
console.log("[Hero]:friend",hv)
|
||||
|
||||
oops.message.dispatchEvent(GameEvent.FriendCalled,{uuid:uuid})
|
||||
}
|
||||
hero_init(uuid:number=1001,node:Node,info:any={ap:0,hp:0,lv:1,crit:0,crit_d:0,dod:0,dod_no:false,crit_no:false}) {
|
||||
var hv = node.getComponent(HeroViewComp)!;
|
||||
|
||||
Reference in New Issue
Block a user