无头模式测试

This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-22 03:51:37 +08:00
parent 5ab90ea221
commit 7389f6d716
535 changed files with 991 additions and 162534 deletions

View File

@@ -6,6 +6,7 @@ import NoviceManager from "../../manager/NoviceManager";
import { JNGLayerBase } from "../../components/JNComponent";
import { app } from "../../App";
import { lerp } from "cc";
import { Env, EnvCurrent } from "../../Env";
const { ccclass, property } = _decorator;
@ccclass('LoadingView')
@@ -35,7 +36,12 @@ export default class LoadingView extends JNGLayerBase {
await NoviceManager.getIns().onStart();
//关闭加载页
await app.layer.Open(GUI.Main);
if(EnvCurrent == Env.Server){
//打开服务器主页
await app.layer.Open(GUI.ServerMain);
}else{
await app.layer.Open(GUI.Main);
}
app.layer.Close(GUI.Loading);
}

View File

@@ -5,6 +5,7 @@ import { EditBox } from 'cc';
import { app } from '../../App';
import { GUI } from '../UIConfig';
import { StorageData, StorageEnum } from '../../consts/GData';
import { Env, EnvCurrent } from '../../Env';
const { ccclass, property } = _decorator;
@ccclass('LoginView')
@@ -20,6 +21,13 @@ export class LoginView extends JNLayerBase {
onJNLoad(resolve?: (token:string) => void): void {
super.onJNLoad();
this.resolve = resolve;
//如果是服务器则取Windows账号密码
if(EnvCurrent == Env.Server){
this.account.string = window['GUser'];
this.password.string = window['GPassworld'];
this.onClickLogin();
}
}

View File

@@ -26,8 +26,9 @@ export enum GUI{
/**游戏模式页面 */
PVPModeMatchView = "PVPModeMatchView", //PVP模式匹配页面
Home = "Home", //主页面
Main = "Main", //主页面2
Home = "Home", //主页面
Main = "Main", //主页面2
ServerMain = "ServerMain", //服务器主页
}
@@ -132,6 +133,16 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = {
backInfo:{key:"position",start:v3(0,0,0),end:v3(-720,0,0)}
},
},
[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)}
},
},
...UISystemConfig, //系统页面
...UINoviceConfig, //新手引导页面
...UIMainConfig, //主页面