cc.Class({ extends: cc.Component, properties: { }, onLoad () { this.videoTotalIndexNumArr = [ 25,//1 27,//2 21,//3 52,//4 0,//5 25,//6 35,//7 71,//7 52,//8 54,//9 51,//10 52,//11 42,//12 34,//13 47,//14 45,//15 46,//16 52,//17 53,//18 21,//19 27,//20 35,//21 0,//22 0,//23 32,//24 46,//25 ]; this.videoFrameArr = []; this.currentRound = 0; }, play(node,index,self,callback) { let sprite = node.getComponent(cc.Sprite); // console.log(this.videoFrameArr) this.currentPlayer = this.playLocalVideo(this.videoFrameArr,sprite,function () { callback(self); }); }, prepareCurrentRoundVideo(index,callback) { let self = this; this.currentRound = index; if(index!=0) { this.stop(); for(let i=0;i