var jian = new cc.Sprite("#images/gongjianshou/jian.png"); jian.attr({ x: this.x, y: this.y + 100, scaleY: this.scaleY, scaleX: -Math.abs(this.scaleX) }); jian.setName('jian'); this.parent.addChild(jian, 30); //抛物线飞行 var sx = jian.x; //开始位置x var sy = jian.y; //开始位置y var ex = target.x + 40; //结束位置x var ey = target.y + 150; //结束位置y var startA = this.scaleX > 0 ? 130 : 40; //起始角度 var endA = this.scaleX > 0 ? 220 :……

Continue reading