我觉得应该在run方法里跳过更好,比如创建10个建筑的任务已经完成8个,那下次进入游戏要直接跳转到创建第9个任务,
run(callback?) {
if (!this._task) {
return;
}
console.log('this._task.steps---------->', this._task.steps)
async.eachSeries(this._task.steps, (step, cb) => {
// todo: 给任务做编号,在这里把小于指定编号的任务都跳过
this._processStep(step, cb);
}, () => {
this._task = null;
cc.log('任务结束');
this._mask.node.active = false;
if (this._finger) {
this._finger.active = false;
}
if (callback) {
callback();
}
});
}