export enum EventState{LoadComplete,SceneInit,StageInit,StageCreateComplete,AnimatorEnd,Select}
export enum StageState{Win,Lose,Start,StageCreateComPlete,Over,Shoot,CreatArrow,Revive,Restart,Press,UnPress}
export class EventManager
{
    private static instance:Laya.EventDispatcher = new Laya.EventDispatcher();

    static EventOn(_mode:EventState,caller:any,fun:Function,args = [])
    {
        EventManager.instance.on(EventState[_mode],caller,fun,args);
    }
    static EventOff(_mode:EventState,caller:any,fun:Function,args = [])
    {
        EventManager.instance.off(EventState[_mode],caller,fun);
    }
    static EventTrigger(_mode:EventState,args = [])
    {
        EventManager.instance.event(EventState[_mode],args);
    }
    static StageOn(_mode:StageState,caller:any,fun:Function,args = [])
    {
        EventManager.instance.on(StageState[_mode],caller,fun,args);
    }
    static StageOff(_mode:StageState,caller:any,fun:Function,args = [])
    {
        EventManager.instance.off(StageState[_mode],caller,fun);
    }
    static StageTrigger(_mode:StageState,args = [])
    {
        EventManager.instance.event(StageState[_mode],args);
    }



}