Commit 252ef706 authored by 李维's avatar 李维

清除一些异步操作导致的爆闪问题

parent 6c49b45a
......@@ -115,8 +115,8 @@ cc.Class({
})
},
destroyed() {
this.gameLogic.destroyed && this.gameLogic.destroyed();
onDestroy() {
this.gameLogic.onDestroy && this.gameLogic.onDestroy();
},
getData(cb) {
......
......@@ -746,8 +746,13 @@ export default class GameLogic {
});
}
destroyed() {
console.log("DES")
onDestroy() {
this.g_timeoutIds.forEach(id=>{
clearTimeout(id)
})
if(this.m_sysIntervalId) {
clearInterval(this.m_sysIntervalId)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment