| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 | 
							- import { _decorator, director, EditBox, } from 'cc';
 
- import { GameInfo } from '../../GameInfo';
 
- import { resMgr } from '../../Frames/ResourcesMgr';
 
- import { ModulerBase } from '../GameFrameWork/ModulerBase';
 
- import { GameMgr } from '../GameFrameWork/GameMgr';
 
- import { SelectTroops } from './SelectTroops';
 
- import { BattleSceneTop } from './BattleSceneTop';
 
- import { localDt } from '../../Frames/LocalDt';
 
- const { ccclass, property } = _decorator;
 
- @ccclass('BattleSceneLeft')
 
- export class BattleSceneLeft extends ModulerBase {
 
-     editBox: EditBox | null = null;
 
-     
 
-     protected onStart() {
 
-         this.editBox = this.getComponentInChildren(EditBox);
 
-         this._setEdit();
 
-         
 
-         this._curLv(GameInfo.Instance.getCurlv());
 
-         this.onBtnClick("_btnLevel", this._btnLevel);
 
-         if(GameInfo.Instance.getOverWin() && GameInfo.Instance.getGameOverReward().size != 0){
 
-             this._curLv(GameInfo.Instance.getGameOverReward().get("CurLv"));
 
-         }
 
-         this.editBox.node.on("editing-did-ended", this._onEdit, this)
 
-     }
 
-     //当前关卡
 
-     private _curLv(lv: number) {
 
-         this.getLabel("_curLv").string = String(lv);
 
-     }
 
-     private _btnLevel() {
 
-         GameMgr.Instance.getModuler(SelectTroops).show();
 
-         GameMgr.Instance.getModuler(BattleSceneTop).battleMode("选择部队")
 
-     }
 
-     //保存名字
 
-     private _onEdit(editbox: EditBox){
 
-         localDt.savePlayerName(editbox.string);
 
-     }
 
-     private _setEdit(){
 
-         if(localDt.getPlayerName()){
 
-             this.editBox.string = localDt.getPlayerName();
 
-         }
 
-     }
 
- }
 
 
  |