mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
126 lines
3.5 KiB
TypeScript
126 lines
3.5 KiB
TypeScript
import { v3 } from "cc";
|
|
import { JNLayerAnim, JNLayerAnimInfo, JNLayerInfo } from "../../../extensions/ngame/assets/ngame/ui/JNLayer";
|
|
|
|
export enum GLayer{
|
|
View = "View",
|
|
Popup = "Popup",
|
|
Tips = "Tips",
|
|
}
|
|
|
|
export enum GUI{
|
|
/** 系统UI */
|
|
Login = "Login", //登录页面
|
|
Loading = "Loading", //加载页面
|
|
Tips = "Tips", //提示
|
|
SelectionBox = "SelectionBox", //选择提示页面 (用于玩家确定该操作)
|
|
|
|
/** 新手引导 */
|
|
NoviceNamingView = "NoviceNamingView", //新手引导页面 - 取名
|
|
NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物
|
|
|
|
/** 主页页面 */
|
|
MainChat = "MainChat", //主页聊天页面
|
|
|
|
IntoBattleView = "IntoBattleView", //上阵页面
|
|
|
|
Home = "Home", //主页面
|
|
Main = "Main", //主页面2
|
|
}
|
|
|
|
|
|
//常用动画
|
|
const BackOutScale:JNLayerAnimInfo = {
|
|
front:JNLayerAnim.BackOutOpen,
|
|
back:JNLayerAnim.BackInClose
|
|
}
|
|
|
|
|
|
//系统UI
|
|
const UISystemConfig:{ [key: string]: JNLayerInfo; } = {
|
|
[GUI.Tips]:{
|
|
layer:GLayer.Tips,
|
|
uri: "prefab/ui/系统页面/提示/TipsView",
|
|
anims:BackOutScale
|
|
},
|
|
[GUI.SelectionBox]:{
|
|
layer:GLayer.Tips,
|
|
uri: "prefab/ui/系统页面/选择提示/SelectionBox",
|
|
anims:BackOutScale,
|
|
},
|
|
[GUI.Login]:{
|
|
layer:GLayer.Popup,
|
|
uri: "prefab/ui/系统页面/LoginView",
|
|
anims:BackOutScale
|
|
},
|
|
[GUI.Loading]:{
|
|
layer:GLayer.View,
|
|
uri: "prefab/ui/加载页面/LoadingView",
|
|
anims:{
|
|
back:JNLayerAnim.Smaller,
|
|
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
|
|
},
|
|
},
|
|
}
|
|
|
|
//主页UI
|
|
const UIMainConfig:{ [key: string]: JNLayerInfo; } = {
|
|
[GUI.MainChat]:{
|
|
layer:GLayer.Popup,
|
|
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)}
|
|
}
|
|
},
|
|
[GUI.IntoBattleView]:{
|
|
layer:GLayer.Popup,
|
|
uri: "prefab/ui/阵法/阵法选择页面",
|
|
anims:BackOutScale,
|
|
},
|
|
}
|
|
|
|
//新手引导页面
|
|
const UINoviceConfig:{ [key: string]: JNLayerInfo; } = {
|
|
|
|
[GUI.NoviceNamingView]:{
|
|
layer:GLayer.Popup,
|
|
uri: "prefab/ui/新手引导页面/NoviceNamingView",
|
|
anims:BackOutScale
|
|
},
|
|
[GUI.NoviceSelectPetView]:{
|
|
layer:GLayer.Popup,
|
|
uri: "prefab/ui/新手引导页面/NoviceSelectPetView",
|
|
anims:BackOutScale
|
|
},
|
|
|
|
}
|
|
|
|
export const UIConfig:{ [key: string]: JNLayerInfo; } = {
|
|
[GUI.Home]:{
|
|
layer:GLayer.View,
|
|
uri: "prefab/ui/主页/HomeView",
|
|
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)}
|
|
},
|
|
},
|
|
[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)}
|
|
},
|
|
},
|
|
...UISystemConfig, //系统页面
|
|
...UINoviceConfig, //新手引导页面
|
|
...UIMainConfig, //主页面
|
|
}
|
|
|