

export enum DispatcherState{LoadComplete,SceneInit,StageInit,StageCreateComplete,GoldGet,PlayerRunning,PlayerStand,ShowModel,RefreshCityName}

export class DispatcherControl
{
    private static instance:Laya.EventDispatcher = new Laya.EventDispatcher();


    static DispatcherOn(_mode:DispatcherState,caller:any,fun:Function,args = [])
    {
        DispatcherControl.instance.on(DispatcherState[_mode],caller,fun,args);
    }
    static DispatcherOff(_mode:DispatcherState,caller:any,fun:Function,args = [])
    {
        DispatcherControl.instance.off(DispatcherState[_mode],caller,fun);
    }
    static DispatcherTrigger(_mode:DispatcherState,args = [])
    {
        DispatcherControl.instance.event(DispatcherState[_mode],args);
    }

}