import { _decorator, } from 'cc';
import { GameInfo } from '../../GameInfo';
import { resMgr } from '../../Frames/ResourcesMgr';
import { ModulerBase } from '../GameFrameWork/ModulerBase';
const { ccclass, property } = _decorator;

@ccclass('BattleSceneRight')
export class BattleSceneRight extends ModulerBase {
    protected onStart() {
        this._grade(GameInfo.Instance.getGrade());
        this._winNumber(GameInfo.Instance.getWin());
        this._failNumber(GameInfo.Instance.getFail());
        //this.onMsg(this.UIName, this._batlleRightHide);
    }

    //账号等级
    private _grade(grade: number) {
        this.getLabel("_grade").string = String(grade);
    }

    //获胜场数
    private _winNumber(win: number) {
        this.getLabel("_win").string = String(GameInfo.Instance.getWin());
    }

    //失败场数
    private _failNumber(fail: number) {
        this.getLabel("_fail").string = String(GameInfo.Instance.getFail());
    }

    // private _batlleRightHide() {
    //     this.hide(false);
    // }
}


