Example #1
0
    /** 重新加载配置 */
    public void onReloadConfig()
    {
        int id = _config.id;

        _config      = SceneConfig.get(id);
        _placeConfig = ScenePlaceConfig.get(id);

        Unit[] values;
        Unit   v;

        for (int i = (values = _units.getValues()).Length - 1; i >= 0; --i)
        {
            if ((v = values[i]) != null)
            {
                v.onReloadConfig();
            }
        }
    }
    /// <summary>
    /// 读完所有表后处理
    /// </summary>
    public static void afterReadConfigAll()
    {
        LongObjectMap <ScenePlaceElementConfig> fDic;

        if (!(fDic = _dic).isEmpty())
        {
            ScenePlaceElementConfig[] values;
            ScenePlaceElementConfig   v;

            for (int i = (values = fDic.getValues()).Length - 1; i >= 0; --i)
            {
                if ((v = values[i]) != null)
                {
                    ScenePlaceConfig.get(v.sceneID).addElement(v);
                }
            }
        }
    }