LayerConf.ts 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //UI类型
  2. export enum LayerType {
  3. Game = 0, //游戏层
  4. UI, //UI层
  5. Notice, //公告层
  6. Guide //引导层
  7. }
  8. //UI配置结构体
  9. export interface LayerConf {
  10. bundle?: string; //BundleName
  11. url: string; //资源路径
  12. type: LayerType; //UI类型
  13. anim?: number; //是否使用动画,0:不用动画、1:全屏界面动画、2:弹窗界面动画
  14. cache?: boolean; //是否缓存该UI的资源(该UI动态加载的资源不会缓存)
  15. bottom?: boolean; //是否是最底层UI(不受切换影响)
  16. preload?: boolean; //是否预加载
  17. special?: boolean; //是否是特殊UI
  18. //destroy?: boolean; //关闭时是否销毁
  19. reset?: boolean;
  20. }
  21. export enum ViewID {
  22. LoginUI = 1, //登录
  23. LoadingUI, //加载
  24. MaskUI, //蒙板
  25. TempTipsUI, //提示
  26. SelectServer, //服务器列表
  27. GameWind, // 子游戏窗口
  28. TowerUI, //塔防
  29. ZombieUI, //打僵尸
  30. MailMain, //邮箱
  31. MailDetail, //邮件
  32. Bulletin, //公告
  33. CommonTips, //通用提示
  34. ItemMsg, //物品详情
  35. HeroList, //英雄列表
  36. HeroAttr, //英雄养成
  37. EquipChoose, //装备选择
  38. EquipStrong, //装备强化
  39. EquipUpdate, //装备升星
  40. EquipOperate, //装备操作
  41. }
  42. export let Layer_Conf: { [key: number]: LayerConf } = {
  43. [ViewID.LoginUI]: { bundle: "package", url: "prefab/login/LoginUI", type: LayerType.UI },
  44. [ViewID.LoadingUI]: { bundle: "package", url: "prefab/login/LoadingUI", type: LayerType.UI },
  45. [ViewID.MaskUI]: { bundle: "package", url: "prefab/ui/relogin/MaskUI", type: LayerType.Notice,special: true, preload: true },
  46. [ViewID.TempTipsUI]: { bundle: "package", url: "prefab/ui/TempTipsUI", type: LayerType.Notice },
  47. [ViewID.GameWind]: { bundle: "package", url: "prefab/ui/GameUI", type: LayerType.UI, anim: 0 },
  48. [ViewID.TowerUI]: { bundle: "package", url: "prefab/ui/tower/tower", type: LayerType.Game, anim: 0 },
  49. [ViewID.ZombieUI]: { bundle: "package", url: "prefab/ui/tower/zombie", type: LayerType.Game, anim: 0 },
  50. [ViewID.MailMain]: { bundle: "mail", url: "prefab/MailMain", type: LayerType.UI, anim: 2 },
  51. [ViewID.MailDetail]: { bundle: "mail", url: "prefab/MailDetail", type: LayerType.UI, anim: 2 },
  52. [ViewID.SelectServer]: { bundle: "package", url: "prefab/login/SelectServer", type: LayerType.UI, anim: 2 },
  53. [ViewID.Bulletin]: { bundle: "package", url: "prefab/login/Bulletin", type: LayerType.UI, anim: 2 },
  54. [ViewID.CommonTips]: { bundle: "package", url: "prefab/ui/tips/CommomTips", type: LayerType.UI, anim: 2 },
  55. [ViewID.ItemMsg]: { bundle: "common", url: "prefab/ItemMsg", type: LayerType.UI, anim: 2 },
  56. [ViewID.HeroList]: { bundle: "hero", url: "prefab/HeroList", type: LayerType.Game, anim: 0 },
  57. [ViewID.HeroAttr]: { bundle: "hero", url: "prefab/HeroAttr", type: LayerType.Game, anim: 0 },
  58. [ViewID.EquipChoose]: { bundle: "hero", url: "prefab/EquipChoose", type: LayerType.Game, anim: 2 },
  59. [ViewID.EquipStrong]: { bundle: "hero", url: "prefab/EquipStrong", type: LayerType.Game, anim: 2 },
  60. [ViewID.EquipUpdate]: { bundle: "hero", url: "prefab/EquipUpdate", type: LayerType.Game, anim: 2 },
  61. [ViewID.EquipOperate]: { bundle: "hero", url: "prefab/EquipOperate", type: LayerType.Game, anim: 2 },
  62. };