12345678910111213141516171819202122232425262728293031323334353637 |
- cc.Class({
- extends: cc.Component,
- properties: {
-
- },
- // LIFE-CYCLE CALLBACKS:
- // onLoad () {},
- start () {
- },
- // update (dt) {},
- showWait(callBack=null){
- this.node.active = true;
- this.callBack = callBack;
- this.timeOut = setTimeout(()=>{
- this.hideWait();
- }, 8000);
- },
- hideWait(){
- if(this.timeOut)
- clearTimeout(this.timeOut);
- if(this.callBack)
- this.callBack();
- this.node.active = false;
- }
- });
|