this._onlineScheduleHandle = this.updateOnlineTime.bind(this); cc.director.getScheduler().unschedule(this._onlineScheduleHandle,this); cc.director.getScheduler().schedule(this._onlineScheduleHandle,this,1.1,cc.REPEAT_FOREVER,false,"keyCountDownTime");
@H_502_3@
Cocos2d-js中,回调函数一定要先保存起来,例如 this._onlineScheduleHandle = this.updateOnlineTime.bind(this);@H_502_3@
其次 cc.director.getScheduler().schedule(this._onlineScheduleHandle,"keyCountDownTime");这个参数一定要写全,否则出问题。