技能动画添加
This commit is contained in:
@@ -31,18 +31,23 @@ export class Skill extends ecs.Entity {
|
||||
pos=v3(pos.x,pos.y)
|
||||
node.parent = parent;
|
||||
node.setPosition(pos)
|
||||
var sv = node.getComponent(SkillCom)!;
|
||||
let angle=0
|
||||
if(SkillSet[uuid].angle){
|
||||
angle = Math.atan2(t_pos.y,t_pos.x) * 180 / Math.PI;
|
||||
if(t_pos.x<0){
|
||||
angle+=180
|
||||
}
|
||||
}
|
||||
sv.angle = angle;
|
||||
console.log(group+" "+SkillSet[uuid].name+"angle:"+angle)
|
||||
var sv = node.getComponent(SkillCom);
|
||||
// let angle=0
|
||||
// if(SkillSet[uuid].angle){
|
||||
// angle = Math.atan2(t_pos.y,t_pos.x) * 180 / Math.PI;
|
||||
// if(t_pos.x<0){
|
||||
// angle+=180
|
||||
// }
|
||||
// }
|
||||
// sv.angle = angle;
|
||||
// console.log(group+" "+SkillSet[uuid].name+"angle:"+angle)
|
||||
sv.s_uuid = uuid;
|
||||
sv.ap = ap;
|
||||
sv.s_name = SkillSet[uuid].name;
|
||||
sv.ap = ap*SkillSet[uuid].ap;
|
||||
sv.cd = SkillSet[uuid].cd;
|
||||
sv.decd = SkillSet[uuid].decd;
|
||||
sv.debuff = SkillSet[uuid].debuff;
|
||||
sv.rate = SkillSet[uuid].rate;
|
||||
sv.is_crit=is_crit
|
||||
sv.crit_add=crit_add
|
||||
// node.setScale(v3(node.scale.x*scale,node.scale.y))
|
||||
|
||||
Reference in New Issue
Block a user