export class GameOverData {
    private static _instance: GameOverData = null;

    private win: boolean = true;
    private killCount: number = 0;
    private lifePercent: number = 0;

    //金币奖励
    private killAward: number = 0;
    private lifeAward: number = 0;
    private stageClearAward: number = 0;
    private totalAward: number = 0;

    //经验奖励
    private xp: number = 0;
    //钻石奖励
    private lifeDia: number = 0;
    private stageClearDia: number = 0;
    private totalDia: number = 0;

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

    clearData() {
        this.win = true;
        this.killCount = 0;
        this.lifePercent = 0;
        this.killAward = 0;
        this.lifeAward = 0;
        this.stageClearAward = 0;
        this.totalAward = 0;
        this.xp = 0;
        this.lifeDia = 0;
        this.stageClearDia = 0;
        this.totalDia = 0;
    }

    get Win(): boolean { return this.win }
    set Win(win: boolean) { this.win = win }

    get KillCount(): number { return this.killCount }
    set KillCount(count: number) { this.killCount = count }

    get LifePercent(): number { return this.lifePercent }
    set LifePercent(percent: number) { this.lifePercent = percent }

    get KillAward(): number { return this.killAward }
    set KillAward(award: number) { this.killAward = award }

    get LifeAward(): number { return this.lifeAward }
    set LifeAward(award: number) { this.lifeAward = award }

    get StageClearAward(): number { return this.stageClearAward }
    set StageClearAward(award: number) { this.stageClearAward = award }

    get TotalAward(): number { return this.totalAward }
    set TotalAward(award: number) { this.totalAward = award }

    get Xp(): number { return this.xp }
    set Xp(xp: number) { this.xp = xp }

    get LifeDia(): number { return this.lifeDia }
    set LifeDia(award: number) { this.lifeDia = award }

    get StageClearDia(): number { return this.stageClearDia }
    set StageClearDia(award: number) { this.stageClearDia = award }

    get TotalDia(): number { return this.totalDia }
    set TotalDia(award: number) { this.totalDia = award }
}