Exemplo n.º 1
0
    public override void Execute(INotification notification)
    {
        //-----------------关联命令-----------------------
        //  Facade.RegisterCommand(NotiConst.DISPATCH_MESSAGE, typeof(SocketCommand));

        //-----------------初始化管理器-----------------------

        /*   Facade.AddManager(ManagerName.Lua, new LuaScriptMgr());
         *
         * Facade.AddManager<PanelManager>(ManagerName.Panel);
         * Facade.AddManager<MusicManager>(ManagerName.Music);
         * Facade.AddManager<TimerManager>(ManagerName.Timer);
         * Facade.AddManager<NetworkManager>(ManagerName.Network);
         * Facade.AddManager<ResourceManager>(ManagerName.Resource);
         */
        //-----------------初始化管理器-----------------------
        Facade.AddManager(ManagerName.Lua, new LuaScriptMgr());


        //添加资源管理器
        Facade.AddManager <ResManager>(ManagerName.Resource);

        //游戏对象管理器
        Facade.AddManager <ObjManager>(ManagerName.ObjMgr);

        //添加音效管理器
        Facade.AddManager <AudioManager>(ManagerName.Music);

        //添加游戏管理器......!!资源管理器对其他管理器对象有依赖,,,必须放所有管理器对象后面添加
        Facade.AddManager <GameManager>(ManagerName.Game);



        Debug.Log("SimpleFramework StartUp-------->>>>>");
    }
Exemplo n.º 2
0
 static int AddManager(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         Facade obj  = (Facade)ToLua.CheckObject(L, 1, typeof(Facade));
         string arg0 = ToLua.CheckString(L, 2);
         object arg1 = ToLua.ToVarObject(L, 3);
         obj.AddManager(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 3
0
    /// <summary>
    /// 执行启动命令
    /// </summary>
    /// <param name="notification"></param>
    public override void Execute(INotification notification)
    {
        //-----------------关联命令-----------------------
        Facade.RegisterCommand(NotiConst.DISPATCH_MESSAGE, typeof(SocketCommand));

        //-----------------初始化管理器-----------------------
        Facade.AddManager(ManagerName.Lua, new LuaScriptMgr());

        Facade.AddManager <PanelManager>(ManagerName.Panel);
        Facade.AddManager <MusicManager>(ManagerName.Music);
        Facade.AddManager <TimerManager>(ManagerName.Timer);
        Facade.AddManager <NetworkManager>(ManagerName.Network);
        Facade.AddManager <ResourceManager>(ManagerName.Resource);
        Facade.AddManager <ThreadManager>(ManagerName.Thread);

        Facade.AddManager <GameManager>(ManagerName.Game);
        Debug.Log("SimpleFramework StartUp-------->>>>>");
    }