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

export class GameManager{
    private static ins:GameManager;
    //开局获取到的play_id;
    public play_id;
    //复活次数
    public ReviveNum:number = 0;
    //记录本关卡的进度分数
    public ScoreProgress:number = 0;
    //目标点
    public TargetPosition: Laya.Vector2;
    //记录本波消除的分数
    public ScoreRecord = 0;
    //是否为首次进入游戏
    public First:boolean = true;
    //新手指引关的掉球波次
    public Wave:number = 1;
    //是否检测高度线
    public CheckHeight:boolean = true;
   
    constructor(){
        GameManager.ins = this;
        EventManager.StageOn(StageMode.Refresh,this,this.Fresh)
    }
    public static get Instance():GameManager{
        if(GameManager.ins){
            return GameManager.ins
        }
        else{
            return new GameManager();
        }
    }
    Fresh(){
        this.ScoreProgress = 0;
        // this.ReviveNum = 1;
    }
}