mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交聊天
This commit is contained in:
30
JisolGameCocos/assets/script/manager/NoviceManager.ts
Normal file
30
JisolGameCocos/assets/script/manager/NoviceManager.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import Singleton from "../../../extensions/ngame/assets/ngame/util/Singleton";
|
||||
import { app } from "../App";
|
||||
import PlayerData from "../data/PlayerData";
|
||||
import PlayerPetData from "../data/PlayerPetData";
|
||||
import { GUI } from "../ui/UIConfig";
|
||||
|
||||
export default class NoviceManager extends Singleton{
|
||||
|
||||
//新手引导执行
|
||||
async onStart(){
|
||||
|
||||
//获取玩家信息是否引导过
|
||||
if(!(PlayerData.getIns().data.novice)){
|
||||
//如果没有过引导则打开引导页面
|
||||
await app.layer.OpenToClose(GUI.NoviceNamingView);
|
||||
}
|
||||
|
||||
//获取玩家信息是否选择过宠物(有没有宠物)
|
||||
//如果没有宠物则弹出让玩家选择宠物
|
||||
if(PlayerPetData.getIns().getData().length == 0){
|
||||
//没有宠物则弹出选择宠物页面
|
||||
await app.layer.OpenToClose(GUI.NoviceSelectPetView);
|
||||
}
|
||||
|
||||
console.log("新手引导结束");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ef14d8c5-9f53-4f42-baeb-1c663be5f283",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user