Commit 279212e7 authored by 李维's avatar 李维

节点销毁时 清除定时器

parent cf128491
......@@ -265,5 +265,11 @@ export default class NewClass extends cc.Component {
});
}
protected onDestroy(): void {
if(this.hideSetTimeoutId) {
clearTimeout(this.hideSetTimeoutId)
this.hideSetTimeoutId = null;
}
}
// update (dt) {}
}
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