computeBezierActions() {
let bezierCurveData = lcl.BezierData.getBezierCurveData();
this.actionLists = [];
// 创建动作队列
for (var i = 0, len = bezierCurveData.points.length; i < len; i++) {
const point = bezierCurveData.points[i];
//计算当前路段需要的时间
let time = point.length / bezierCurveData.length * bezierCurveData.time;
point.time = time;
// 创建动作
let action = cc.moveTo(time, cc.v2(point.x, point.y));
this.actionLists.push(action);
}
},
获取了移动轨迹之后,这个移动动画损耗是不是太大,一下几百几千个点。也就是几百几千个 cc.MoveTo。请教有没有更好的方式?