Blogger Information
Blog 56
fans 7
comment 11
visits 221165
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
cocos2.x unschedule如何停止计时器
樂成的开发笔记
Original
529 people have browsed it

项目中启动定时器,如果没有停止然后更新数据的话,容易产生多个定时器,所以先取消再启动

Scheduler 类型

官方API

this.timer = function () { //do something } this.schedule(that.timer,1,Number(setSecondTime)-1) //停止的时候就是这样 unschedule(this.timer);


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply withNews Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!