mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
20
JisolGameCocos/assets/script/ui/Novice/NoviceManager.ts
Normal file
20
JisolGameCocos/assets/script/ui/Novice/NoviceManager.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Singleton from "../../../../extensions/ngame/assets/ngame/util/Singleton";
|
||||
import { app } from "../../App";
|
||||
import { GUI } from "../UIConfig";
|
||||
|
||||
export default class NoviceManager extends Singleton{
|
||||
|
||||
//新手引导执行
|
||||
async onStart(){
|
||||
|
||||
if(!(app.data.getPlayerInfo().novice)){
|
||||
//如果没有过引导则打开引导页面
|
||||
await app.layer.OpenToClose(GUI.NoviceNamingView);
|
||||
}
|
||||
|
||||
console.log("新手引导结束");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "8b5cc1e0-3fa2-4ee3-b93b-2da9878f9c8c",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
24
JisolGameCocos/assets/script/ui/Novice/NoviceNamingView.ts
Normal file
24
JisolGameCocos/assets/script/ui/Novice/NoviceNamingView.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { app, JNGLayerBase } from '../../App';
|
||||
import { EditBox } from 'cc';
|
||||
import { API } from '../../consts/API';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('NoviceNamingView')
|
||||
export class NoviceNamingView extends JNGLayerBase {
|
||||
|
||||
@property(EditBox)
|
||||
text:EditBox;
|
||||
|
||||
//保存名称
|
||||
async onSave(){
|
||||
if(this.text.string){
|
||||
await API.SavePlayerInfo(this.text.string);
|
||||
//关闭页面
|
||||
app.layer.CloseNode(this.node);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ccac142a-85d0-4cc2-9f66-e71110e1d69d",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { JNGLayerBase } from '../../App';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('NoviceSelectPetView')
|
||||
export class NoviceSelectPetView extends JNGLayerBase {
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "0bc93bda-24b6-4fb9-809c-d5d4ebbf22ec",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
Reference in New Issue
Block a user