import { _decorator, Component, Label, Node } from 'cc';
import { GameInfo } from '../../GameInfo';
import { ModulerBase } from '../GameFrameWork/ModulerBase';
const { ccclass, property } = _decorator;

@ccclass('SelectTroops')
export class SelectTroops extends ModulerBase {
    protected onStart() {
        this._setLvNumber(GameInfo.Instance.getCurlv());
        this._setOreGrade(GameInfo.Instance.getOreGrade());
        this._setOreSpeed(GameInfo.Instance.getOreSpeed());
    }

    //关卡
    private _setLvNumber(curLv: number){
        this.getNode("_lvNumber").getComponent(Label).string = String(curLv);
    }

    //矿场等级
    private _setOreGrade(oreGrade: number){
        this.getNode("_oreGrade").getComponent(Label).string = "等级：" + String(oreGrade)
    }

    //矿石速度
    private _setOreSpeed(oreSpeed: number){
        this.getNode("_oreSpeed").getComponent(Label).string = String(oreSpeed) + "/分钟";
    }
}


