import { _decorator, } 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';
const { ccclass, property } = _decorator;

@ccclass('BattleSceneLeft')
export class BattleSceneLeft extends ModulerBase {

    protected onStart() {
        this._curLv(GameInfo.Instance.getCurlv());
        this.onBtnClick("_btnLevel", this._btnLevel);
    }

    //当前关卡
    private _curLv(lv: number) {
        this.getLabel("_curLv").string = String(GameInfo.Instance.getCurlv());
    }

    private _btnLevel() {
        // UIMgr.sendMsg("_battleMode", "BattleScene_Top");
        // UIMgr.sendMsg("_batlleRightHide", "BattleScene_Right");
        GameMgr.Instance.getModuler(SelectTroops).show();
        GameMgr.Instance.getModuler(BattleSceneTop).battleMode("选择部队")
    }
}


