import { PlayerManager } from "./PlayerManager";
import { DispatcherManager, StageState } from "../GameUtils/EventManager";

export class LevelManager{
    private static ins:LevelManager;
    constructor(){
        LevelManager.ins = this;
    }
    public static get Instance():LevelManager{
        if(LevelManager.ins == null){
            return new LevelManager();
        }
        return LevelManager.ins;
    }
    public spritepool:Laya.Sprite3D;

    RegEvent(){
        DispatcherManager.StageOn(StageState.Lose,this,this.GameLose);
        DispatcherManager.StageOn(StageState.Win,this,this.GameWin);
        DispatcherManager.StageOn(StageState.Pause,this,this.GamePause);
        DispatcherManager.StageOn(StageState.Resume,this,this.GameResume);
    }
    GameStart(){
        PlayerManager.Instance.Init();
        PlayerManager.Instance.EnablePlayer();
    }
    GameLose(){

    }
    GameWin(){

    }
    GamePause(){

    }
    GameResume(){

    }
}