import { EventManager,StageMode } from "../Tool/EventManager";
import { AccountManager } from "../Net/AccountManager";

export class GameManager{
    private static ins:GameManager;
    //复活次数
    public ReviveNum:number = 1;
    //记录本关卡的进度分数
    public ScoreProgress:number = 0;
    //目标点
    public TargetPosition: Laya.Vector2;
    //是否已经克隆完毕
    public Cloned:boolean = false;
    //记录本波消除的分数
    public ScoreRecord = 0;

   //本关卡能掉落的最小的球
   public MinBall:number = 0;
   //本关卡能掉落的次小的球
   public MinNextBall:number = 0;
   //掉落线
   public FallDownLine:number = 500;
   //当前关卡
   public STAGE:number = 0;
    constructor(){
        GameManager.ins = this;
        EventManager.StageOn(StageMode.ReStart,this,this.Fresh)
    }
    public static get Instance():GameManager{
        if(GameManager.ins){
            return GameManager.ins
        }
        else{
            return new GameManager();
        }
    }
    Fresh(){
        this.ScoreProgress = 0;
        this.ReviveNum = 0;

    }
     
    

}