Commit eb171062 authored by XieChuanJin's avatar XieChuanJin

修复后台时间bug

parent 84179b0b
...@@ -54,14 +54,7 @@ export function customClassPrototype() { ...@@ -54,14 +54,7 @@ export function customClassPrototype() {
}); */ }); */
egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, updateDeltaTime, null); egret.MainContext.instance.stage.addEventListener(egret.Event.ENTER_FRAME, updateDeltaTime, null);
egret.lifecycle.onPause = () => {
// deltaTimeBeforPause = egret.getTimer() - egret.Timer["_curTime"];
}
egret.lifecycle.onResume = () => { egret.lifecycle.onResume = () => {
egret.Timer["_curTime"] = egret.getTimer(); /* - deltaTimeBeforPause || 0; */ curTime = egret.getTimer(); /* - deltaTimeBeforPause || 0; */
} }
/* Array.prototype.remove = function (element: any) {
return this.filter((e: any) => e != element);
} */
} }
\ 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