技能移动修改
This commit is contained in:
@@ -35,7 +35,7 @@ export class Monster extends ecs.Entity {
|
||||
}
|
||||
|
||||
/** 加载角色 */
|
||||
load(pos: Vec3 = Vec3.ZERO,camp:number = -1,uuid:number=1001) {
|
||||
load(pos: Vec3 = Vec3.ZERO,scale:number = -1,uuid:number=1001) {
|
||||
// var path = "game/monster/"+prefab_path;
|
||||
var path = "game/heros/hero";
|
||||
|
||||
@@ -45,7 +45,7 @@ export class Monster extends ecs.Entity {
|
||||
node.parent = scene.entityLayer!.node!;
|
||||
var as = node.getComponent(MonsterSpine);
|
||||
|
||||
node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*camp, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z);
|
||||
node.getChildByName("avatar").setScale(node.getChildByName("avatar").scale.x*scale, node.getChildByName("avatar").scale.y, node.getChildByName("avatar").scale.z);
|
||||
node.setPosition(pos)
|
||||
// console.log(node.getChildByName("avatar").getChildByName("TNode").getChildByName("bb").getComponent(Sprite))
|
||||
const url = 'game/heros/heros';
|
||||
@@ -67,7 +67,7 @@ export class Monster extends ecs.Entity {
|
||||
mv.atk_cd = smc.heros[uuid].atk_cd;
|
||||
mv.power = smc.heros[uuid].power;
|
||||
mv.type = smc.heros[uuid].type;
|
||||
mv.camp = -1;
|
||||
mv.scale = -1;
|
||||
mv.Tpos = v3(0,0,0);
|
||||
mv.change_name(smc.heros[uuid].name,-1)
|
||||
this.add(mv);
|
||||
|
||||
Reference in New Issue
Block a user