1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- //UI类型
- export enum LayerType {
- Game = 0, //游戏层
- UI, //UI层
- Notice, //公告层
- Guide //引导层
- }
- //UI配置结构体
- export interface LayerConf {
- bundle?: string; //BundleName
- url: string; //资源路径
- type: LayerType; //UI类型
- anim?: number; //是否使用动画,0:不用动画、1:全屏界面动画、2:弹窗界面动画
- cache?: boolean; //是否缓存该UI的资源(该UI动态加载的资源不会缓存)
- bottom?: boolean; //是否是最底层UI(不受切换影响)
- preload?: boolean; //是否预加载
- special?: boolean; //是否是特殊UI
- //destroy?: boolean; //关闭时是否销毁
- reset?: boolean;
- }
- export enum ViewID {
- LoginUI = 1, //登录
- LoadingUI, //加载
- MaskUI, //蒙板
- TempTipsUI, //提示
- SelectServer, //服务器列表
- GameWind, // 子游戏窗口
- TowerUI, //塔防
- ZombieUI, //打僵尸
- MailMain, //邮箱
- MailDetail, //邮件
- Bulletin, //公告
- CommonTips, //通用提示
- ItemMsg, //物品详情
- HeroList, //英雄列表
- HeroAttr, //英雄养成
- EquipChoose, //装备选择
- EquipStrong, //装备强化
- EquipUpdate, //装备升星
- EquipOperate, //装备操作
-
- }
- export let Layer_Conf: { [key: number]: LayerConf } = {
- [ViewID.LoginUI]: { bundle: "package", url: "prefab/login/LoginUI", type: LayerType.UI },
- [ViewID.LoadingUI]: { bundle: "package", url: "prefab/login/LoadingUI", type: LayerType.UI },
- [ViewID.MaskUI]: { bundle: "package", url: "prefab/ui/relogin/MaskUI", type: LayerType.Notice,special: true, preload: true },
- [ViewID.TempTipsUI]: { bundle: "package", url: "prefab/ui/TempTipsUI", type: LayerType.Notice },
- [ViewID.GameWind]: { bundle: "package", url: "prefab/ui/GameUI", type: LayerType.UI, anim: 0 },
- [ViewID.TowerUI]: { bundle: "package", url: "prefab/ui/tower/tower", type: LayerType.Game, anim: 0 },
- [ViewID.ZombieUI]: { bundle: "package", url: "prefab/ui/tower/zombie", type: LayerType.Game, anim: 0 },
- [ViewID.MailMain]: { bundle: "mail", url: "prefab/MailMain", type: LayerType.UI, anim: 2 },
- [ViewID.MailDetail]: { bundle: "mail", url: "prefab/MailDetail", type: LayerType.UI, anim: 2 },
- [ViewID.SelectServer]: { bundle: "package", url: "prefab/login/SelectServer", type: LayerType.UI, anim: 2 },
- [ViewID.Bulletin]: { bundle: "package", url: "prefab/login/Bulletin", type: LayerType.UI, anim: 2 },
- [ViewID.CommonTips]: { bundle: "package", url: "prefab/ui/tips/CommomTips", type: LayerType.UI, anim: 2 },
- [ViewID.ItemMsg]: { bundle: "common", url: "prefab/ItemMsg", type: LayerType.UI, anim: 2 },
- [ViewID.HeroList]: { bundle: "hero", url: "prefab/HeroList", type: LayerType.Game, anim: 0 },
- [ViewID.HeroAttr]: { bundle: "hero", url: "prefab/HeroAttr", type: LayerType.Game, anim: 0 },
- [ViewID.EquipChoose]: { bundle: "hero", url: "prefab/EquipChoose", type: LayerType.Game, anim: 2 },
- [ViewID.EquipStrong]: { bundle: "hero", url: "prefab/EquipStrong", type: LayerType.Game, anim: 2 },
- [ViewID.EquipUpdate]: { bundle: "hero", url: "prefab/EquipUpdate", type: LayerType.Game, anim: 2 },
- [ViewID.EquipOperate]: { bundle: "hero", url: "prefab/EquipOperate", type: LayerType.Game, anim: 2 },
- };
|