181 lines
5.2 KiB
TypeScript
Raw Normal View History

2023-11-05 03:26:09 +08:00
import { v3 } from "cc";
2023-11-16 19:10:19 +08:00
import { JNLayerAnim, JNLayerAnimInfo, JNLayerInfo } from "../../../extensions/ngame/assets/ngame/ui/JNLayer";
2023-10-23 18:56:01 +08:00
export enum GLayer{
View = "View",
2023-11-08 02:32:54 +08:00
Popup = "Popup",
Tips = "Tips",
2023-10-23 18:56:01 +08:00
}
export enum GUI{
2023-11-08 02:32:54 +08:00
/** 系统UI */
2023-11-16 02:44:43 +08:00
Login = "Login", //登录页面
Loading = "Loading", //加载页面
Tips = "Tips", //提示
SelectionBox = "SelectionBox", //选择提示页面 (用于玩家确定该操作)
2023-11-08 02:32:54 +08:00
2023-11-10 03:56:07 +08:00
/** 新手引导 */
NoviceNamingView = "NoviceNamingView", //新手引导页面 - 取名
NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物
2023-11-15 18:38:00 +08:00
/** 主页页面 */
MainChat = "MainChat", //主页聊天页面
IntoBattleView = "IntoBattleView", //上阵页面
2023-11-26 03:06:23 +08:00
PetUpStarView = "PetUpStarView", //宠物升星页面
MainOnHookView = "MainOnHookView", //挂机弹窗
MapSelectView = "MapSelectView", //地图选择页面
2023-11-26 03:06:23 +08:00
2023-11-20 18:25:50 +08:00
/**游戏模式页面 */
PVPModeMatchView = "PVPModeMatchView", //PVP模式匹配页面
2023-12-10 00:58:43 +08:00
CampGuardianView = "CampGuardianView", //阵营守护战斗页面
2023-11-20 18:25:50 +08:00
2023-11-22 03:51:37 +08:00
Home = "Home", //主页面
Main = "Main", //主页面2
ServerMain = "ServerMain", //服务器主页
2023-10-23 18:56:01 +08:00
}
2023-11-08 02:32:54 +08:00
2023-11-16 19:10:19 +08:00
//常用动画
const BackOutScale:JNLayerAnimInfo = {
front:JNLayerAnim.BackOutOpen,
back:JNLayerAnim.BackInClose
}
2023-11-08 02:32:54 +08:00
//系统UI
const UISystemConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.Tips]:{
layer:GLayer.Tips,
2023-11-16 02:44:43 +08:00
uri: "prefab/ui/系统页面/提示/TipsView",
2023-11-16 19:10:19 +08:00
anims:BackOutScale
2023-11-08 02:32:54 +08:00
},
2023-11-16 02:44:43 +08:00
[GUI.SelectionBox]:{
layer:GLayer.Tips,
uri: "prefab/ui/系统页面/选择提示/SelectionBox",
2023-11-16 19:10:19 +08:00
anims:BackOutScale,
2023-11-16 02:44:43 +08:00
},
2023-11-08 02:32:54 +08:00
[GUI.Login]:{
layer:GLayer.Popup,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/系统页面/LoginView",
2023-11-16 19:10:19 +08:00
anims:BackOutScale
2023-11-08 02:32:54 +08:00
},
[GUI.Loading]:{
2023-11-05 03:26:09 +08:00
layer:GLayer.View,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/加载页面/LoadingView",
2023-11-05 03:26:09 +08:00
anims:{
back:JNLayerAnim.Smaller,
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
},
},
2023-11-08 02:32:54 +08:00
}
2023-11-14 03:35:48 +08:00
//主页UI
const UIMainConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.MainChat]:{
2023-11-16 19:10:19 +08:00
layer:GLayer.Popup,
2023-11-14 03:35:48 +08:00
uri: "prefab/ui/主页/聊天/MainChatView",
anims:{
front:JNLayerAnim.Enlarge,
back:JNLayerAnim.Smaller,
frontInfo:{key:"position",start:v3(0,-1280,0),end:v3(0,0,0)},
backInfo:{key:"position",start:v3(0,0,0),end:v3(0,-1280,0)}
}
},
2023-11-16 19:10:19 +08:00
[GUI.IntoBattleView]:{
layer:GLayer.Popup,
uri: "prefab/ui/阵法/阵法选择页面",
anims:BackOutScale,
},
[GUI.MainOnHookView]:{
layer:GLayer.Popup,
uri: "prefab/ui/主页/挂机/主页挂机页面",
anims:BackOutScale,
},
[GUI.MapSelectView]:{
layer:GLayer.Popup,
uri: "prefab/ui/地图/地图选择页面",
anims:BackOutScale,
},
2023-11-14 03:35:48 +08:00
}
2023-11-26 03:06:23 +08:00
//宠物页面
const UIPetConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.PetUpStarView]:{
layer:GLayer.Popup,
uri: "prefab/ui/宠物/宠物升星页面",
anims:BackOutScale,
},
}
2023-11-10 03:56:07 +08:00
//新手引导页面
const UINoviceConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.NoviceNamingView]:{
layer:GLayer.Popup,
uri: "prefab/ui/新手引导页面/NoviceNamingView",
2023-11-16 19:10:19 +08:00
anims:BackOutScale
2023-11-10 03:56:07 +08:00
},
[GUI.NoviceSelectPetView]:{
layer:GLayer.Popup,
uri: "prefab/ui/新手引导页面/NoviceSelectPetView",
2023-11-16 19:10:19 +08:00
anims:BackOutScale
2023-11-10 03:56:07 +08:00
},
}
2023-11-20 18:25:50 +08:00
//游戏模式页面
const UIGModeConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.PVPModeMatchView]:{
layer:GLayer.Popup,
uri: "prefab/ui/模式/PVP/PVP匹配页面",
anims:BackOutScale
},
2023-12-10 00:58:43 +08:00
[GUI.CampGuardianView]:{
layer:GLayer.Popup,
uri: "prefab/ui/模式/CampGuardian/阵营守护战斗页面",
anims:BackOutScale
},
2023-11-20 18:25:50 +08:00
}
2023-11-08 02:32:54 +08:00
export const UIConfig:{ [key: string]: JNLayerInfo; } = {
[GUI.Home]:{
2023-11-05 03:26:09 +08:00
layer:GLayer.View,
2023-11-10 03:56:07 +08:00
uri: "prefab/ui/主页/HomeView",
2023-11-05 03:26:09 +08:00
anims:{
front:JNLayerAnim.Enlarge,
back:JNLayerAnim.Smaller,
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
},
},
2023-11-13 02:37:29 +08:00
[GUI.Main]:{
layer:GLayer.View,
uri: "prefab/ui/主页/MainView",
anims:{
front:JNLayerAnim.Enlarge,
back:JNLayerAnim.Smaller,
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
},
},
2023-11-22 03:51:37 +08:00
[GUI.ServerMain]:{
layer:GLayer.View,
uri: "prefab/ui/主页/ServerMainView",
anims:{
front:JNLayerAnim.Enlarge,
back:JNLayerAnim.Smaller,
frontInfo:{key:"position",start:v3(720,0,0),end:v3(0,0,0)},
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
},
},
2023-11-10 03:56:07 +08:00
...UISystemConfig, //系统页面
...UINoviceConfig, //新手引导页面
2023-11-14 03:35:48 +08:00
...UIMainConfig, //主页面
2023-11-26 03:06:23 +08:00
...UIPetConfig, //宠物页面
2023-11-20 18:25:50 +08:00
...UIGModeConfig, //游戏模式页面
2023-10-23 18:56:01 +08:00
}