Commit 618d06af authored by Chen Jiping's avatar Chen Jiping

feat:调整延时

parent a6f8cc55
......@@ -84,7 +84,14 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
protected onDestroy(): void {
cc.Tween.stopAll();
if(this.cat){
for(let i = 0; i < this.cat.delayArr.length; ++ i){
let tween = this.cat.delayArr[i];
tween && tween.stop();
}
}
}
_cantouch = null;
......
......@@ -12,6 +12,8 @@ export class Cat extends Item {
*/
private _standby = false;
delayArr: Array<cc.Tween> = [];
set standby(standby: boolean) {
this._standby = standby;
}
......
......@@ -147,7 +147,8 @@ export class Word extends Item {
console.log(timeout, duration)
delayCall(timeout + 1, callback);
let tween = delayCall(timeout + 1, callback);
this._cat.delayArr.push(tween);
}
}
......@@ -357,7 +358,8 @@ export class Word2 extends Item {
timeout = duration;
}
delayCall(timeout + 1, callback);
let tween = delayCall(timeout + 1, callback);
this._cat.delayArr.push(tween);
}
}
......
......@@ -149,7 +149,9 @@ import { delayCall, getSprNodeByUrl, playAudio } from "./util";
timeout = duration;
}
delayCall(timeout, callback)
let tw = delayCall(timeout, callback)
this._cat.delayArr.push(tw);
}
}
}
\ No newline at end of file
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