mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-10-08 16:16:10 +00:00
update
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user