Example #1
0
    /// <summary>
    /// 读完所有配置
    /// </summary>
    public override void afterReadConfigAllOne(int type)
    {
        base.afterReadConfigAllOne(type);

        switch (type)
        {
        case ConfigType.Global:
        {
            GGlobal.afterReadConfigAll();
        }
        break;

        case ConfigType.Function:
        {
            GFunctionConfig.afterReadConfigAll();
        }
        break;

        case ConfigType.Scene:
        {
            GSceneConfig.afterReadConfigAll();
        }
        break;

        case ConfigType.UI:
        {
            GUIConfig.afterReadConfigAll();
        }
        break;
        }
    }
Example #2
0
    /// <summary>
    /// 设置值到Config上
    /// </summary>
    public override void setToConfigOne(int type)
    {
        base.setToConfigOne(type);

        switch (type)
        {
        case ConfigType.Global:
        {
            GGlobal.readFromData((GGlobalReadData)global);
            GGlobal.afterReadConfig();
        }
        break;

        case ConfigType.Function:
        {
            GFunctionConfig.setGDic(gfunctionDic);
        }
        break;

        case ConfigType.Scene:
        {
            GSceneConfig.setGDic(gsceneDic);
        }
        break;

        case ConfigType.UI:
        {
            GUIConfig.setGDic(guiDic);
        }
        break;
        }
    }
Example #3
0
    /// <summary>
    /// 添加到Config上
    /// </summary>
    public override void addToConfigOne(int type)
    {
        base.addToConfigOne(type);

        switch (type)
        {
        case ConfigType.Function:
        {
            GFunctionConfig.addGDic(gfunctionDic);
        }
        break;

        case ConfigType.Scene:
        {
            GSceneConfig.addGDic(gsceneDic);
        }
        break;

        case ConfigType.UI:
        {
            GUIConfig.addGDic(guiDic);
        }
        break;
        }
    }
Example #4
0
    /// <summary>
    /// 读取功能表
    /// </summary>
    protected override void readFunction(BytesReadStream stream)
    {
        GFunctionConfig config;
        int             len = stream.readLen();

        gfunctionDic = new IntObjectMap <GFunctionConfig>(len);
        functionDic  = new IntObjectMap <FunctionConfig>(len);
        for (int i = 0; i < len; ++i)
        {
            config = new GFunctionConfig();
            config.readBytesSimple(stream);
            gfunctionDic.put(config.id, config);
            functionDic.put(config.id, config);
        }
    }