From 2146194232a31f53cfbd528d3742aa6d3cc2277b Mon Sep 17 00:00:00 2001 From: DFB <2576663552@qq.com> Date: Sun, 26 Apr 2020 11:18:42 +0800 Subject: [PATCH] Update Scene.ts import { Config } from "../../Config"; --- src/layaAir/laya/display/Scene.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layaAir/laya/display/Scene.ts b/src/layaAir/laya/display/Scene.ts index 6853daa932..b42e77f836 100644 --- a/src/layaAir/laya/display/Scene.ts +++ b/src/layaAir/laya/display/Scene.ts @@ -10,6 +10,7 @@ import { Timer } from "../utils/Timer" import { ILaya } from "../../ILaya"; import { ClassUtils } from "../utils/ClassUtils"; import { URL } from "../net/URL"; +import { Config } from "../../Config"; /** * 场景类,负责场景创建,加载,销毁等功能 @@ -421,7 +422,7 @@ export class Scene extends Sprite { * @param param 打开参数,如果是scene,则会传递给onOpened方法 * @param delay 延迟打开时间,默认500毫秒 */ - static showLoadingPage(param: any = null, delay: number = 500): void { + static showLoadingPage(param: any = null, delay: number = Config.showLoadingPageDelay): void { if (Scene._loadPage) { ILaya.systemTimer.clear(null, Scene._showLoading); ILaya.systemTimer.clear(null, Scene._hideLoading); @@ -442,7 +443,7 @@ export class Scene extends Sprite { * 隐藏loading界面 * @param delay 延迟关闭时间,默认500毫秒 */ - static hideLoadingPage(delay: number = 500): void { + static hideLoadingPage(delay: number = Config.hideLoadingPageDelay): void { if (Scene._loadPage) { ILaya.systemTimer.clear(null, Scene._showLoading); ILaya.systemTimer.clear(null, Scene._hideLoading); @@ -453,4 +454,4 @@ export class Scene extends Sprite { ILaya.regClass(Scene); ClassUtils.regClass("laya.display.Scene", Scene); -ClassUtils.regClass("Laya.Scene", Scene); \ No newline at end of file +ClassUtils.regClass("Laya.Scene", Scene);