/*
 * @Date: 2021-08-12 09:33:37
 * @LastEditors: mojunshou 1637302775@qq.com
 * @LastEditTime: 2025-03-14 18:16:14
 * @desc:游戏界面场景控制
 */
import { LayerType, UIConfig } from "../../../../../extensions/oops-plugin-framework/assets/core/gui/layer/LayerManager";

/** 界面唯一标识（方便服务器通过编号数据触发界面打开） */
export enum UIID {
    /** 资源加载界面 */
    Loading = 1,
    /** 提示弹出窗口 */
    Alert,
    /** 确认弹出窗口 */
    Confirm,
    /** DEMO */
    Demo,
    /**开始场景 */
    Start,
    /**游戏场景 */
    Game,
    /**设置面板 */
    Setting,
    /**游戏结束*/
    GameOver
}

/** 打开界面方式的配置数据 */
export var UIConfigData: { [key: number]: UIConfig } = {
    [UIID.Loading]: { layer: LayerType.UI, prefab: "gui/loading/loading" },
    [UIID.Alert]: { layer: LayerType.Dialog, prefab: "common/prefab/alert" },
    [UIID.Confirm]: { layer: LayerType.Dialog, prefab: "common/prefab/confirm" },
    [UIID.Demo]: { layer: LayerType.UI, prefab: "gui/demo/demo" },
    [UIID.Start]: { layer: LayerType.UI, prefab: "gui/start/start" },
    [UIID.Game]: { layer: LayerType.UI, prefab: "gui/eliminate/eliminate" },
    [UIID.Setting]: { layer: LayerType.PopUp, prefab: "common/prefab/setting" },
    [UIID.GameOver]: { layer: LayerType.UI, prefab: "gui/eliminate/prefabs/GameOver" }
}

