技能layer改变,位置信息修改
This commit is contained in:
@@ -29,8 +29,9 @@ export class Skill extends ecs.Entity {
|
||||
// console.log("load skill :",path,prefab)
|
||||
var node = instantiate(prefab);
|
||||
pos=v3(pos.x,pos.y)
|
||||
node.parent = parent;
|
||||
node.parent = parent.parent;
|
||||
node.setPosition(pos)
|
||||
if(group==BoxSet.MONSTER) node.setScale(v3(-1*node.scale.x,node.scale.y));
|
||||
var sv = node.getComponent(SkillCom);
|
||||
// let angle=0
|
||||
// if(SkillSet[uuid].angle){
|
||||
@@ -54,7 +55,7 @@ export class Skill extends ecs.Entity {
|
||||
// node.setScale(v3(node.scale.x*scale,node.scale.y))
|
||||
sv.speed=SkillSet[uuid].speed;
|
||||
sv.in_time=SkillSet[uuid].in;
|
||||
// if(group==BoxSet.MONSTER) t_pos.x=-1*t_pos.x
|
||||
|
||||
sv.t_pos = t_pos; // 目标增量
|
||||
sv.type = SkillSet[uuid].type;
|
||||
sv.box_tag= BoxSet.SKILL_TAG;
|
||||
|
||||
Reference in New Issue
Block a user