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

export class GameManager{
    private static ins:GameManager;
    static STAGE:number = -1;

    static GoldNum:number = 0;
    
    constructor(){
        GameManager.ins = this;
    }
    static play_id:any;
    public static get Instance():GameManager{
        if(GameManager.ins == null){
            return new GameManager();
        }
        return GameManager.ins;
    }
    GameLose(){
        DispatcherManager.StageTrigger(StageState.Lose);
    }
    GameWin(){
        DispatcherManager.StageTrigger(StageState.Win);
    }
    GameOver(){
        AssetManager.Instance.SetCharacterPos();
        DispatcherManager.StageTrigger(StageState.Over);
    }
    
}