mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
25 lines
556 B
TypeScript
25 lines
556 B
TypeScript
|
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);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|