export class GameInfo {

    private static _instance: GameInfo = null;
    //当前关卡
    private _curlv: number = 7;
    //获胜场数
    private _winNumber: number = 1;
    //失败场数
    private _failNumber: number = 0;
    //金币数量
    private _goldAmount: number = 1845;
    //钻石数量
    private _diamondAmout: number = 254;
    //等级
    private _grade: number = 3;
   
    //矿场等级
    private _oreGrade: number = 3;
    //矿场速度
    private _oreSpeed: number = 50;

    private _roleImgNames: string[] = [];

    //拥有钻石数量
    private _ownDiamondNum: number = 30;

    //释放技能需要的钻石数量
    private _needDiamondNum: number = 3;

    //我方防御塔总血量
    private _myTowerHp: number = 3000;

    private constructor() { };
    static get Instance(): GameInfo {
        if (!this._instance) {
            this._instance = new GameInfo();
        }
        return this._instance;
    }

    //关卡
    getCurlv(): number { return this._curlv };
    setCurLv(lv: number) { this._curlv = lv };

    //获胜场数
    getWin(): number { return this._winNumber };
    setWin(win: number) { this._winNumber = win };

    //失败场数
    getFail(): number { return this._failNumber };
    setFail(fail: number) { this._failNumber = fail };

    //金币数量
    getGold(): number { return this._goldAmount };
    setGold(gold: number) { this._goldAmount = gold };

    //钻石数量
    getDiamond(): number { return this._diamondAmout };
    setDiamond(diamond: number) { this._diamondAmout = diamond };

    //玩家账号等级
    getGrade(): number { return this._grade };
    setGrade(grade: number) { this._grade = grade };

    //矿场等级
    getOreGrade(): number { return this._oreGrade };
    setOreGrade(oreGrade: number) { this._oreGrade = oreGrade };

    //矿场速度
    getOreSpeed(): number { return this._oreSpeed };
    setOreSpeed(oreSpeed: number) { this._oreSpeed = oreSpeed };

    getRoleImgNames(): string[] { return this._roleImgNames };
    setRoleImgNames(names: string[]) { return this._roleImgNames = names };

    //拥有钻石数量
    getOwnDiamondNum(): number { return this._ownDiamondNum };
    setOwnDiamondNum(number: number) { return this._ownDiamondNum = number };

    //释放技能需要的钻石数量
    getNeedDiamondNum(): number { return this._needDiamondNum };
    setNeedDiamondNum(number: number) { return this._needDiamondNum = number };

    //我方防御塔血量
    getMyTowerHp(): number { return this._myTowerHp };
    setMyTowerHp(hp: number) { return this._myTowerHp = hp };

}