Exemplo n.º 1
0
    protected override bool Setup(IRootConfig rootConfig, IServerConfig config)
    {
        //TODO 读取配置设置isDebug
        Debug.SetLogger(Logger, true);

        try
        {
            updateInterval          = int.Parse(config.Options.Get("UpdateInterval"));
            SyncDebugSystem.isDebug = bool.Parse(config.Options.Get("IsDebug"));
        }
        catch { }

        Debug.Log("SyncService Setup Mode: " + config.Mode
                  + "\nupdateInterval " + updateInterval
                  + "\nisDebug " + SyncDebugSystem.isDebug);

        dataBaseService.Init(this, config);

        m_timerService.Init(this, config);
        matchService.Init(this, config);
        loginService.Init(this, config);
        reConnectService.Init(this, config);
        selectCharacterService.Init(this, config);
        settlementService.Init(this, config);

        m_aiService.Init(this, config);

        CommandMessageService <CommandComponent> .Init();

        UpdateEngine.Init(updateInterval);

        return(base.Setup(rootConfig, config));
    }