예제 #1
0
        public static WorldmapEditorCfg parse(Hashtable map)
        {
            WorldmapEditorCfg cfg = new WorldmapEditorCfg();

            cfg.size               = MapEx.getInt(map, "size");
            cfg.pageSize           = MapEx.getInt(map, "pageSize");
            cfg.mapAreaTexturePath = MapEx.getString(map, "mapAreaTexturePath");
            cfg.colors4MapAreaJson = MapEx.getString(map, "colors4MapAreaJson");
            return(cfg);
        }
예제 #2
0
    public void init()
    {
        if (isInited)
        {
            return;
        }
        isInited = true;
        Hashtable mapCfg = new Hashtable();
        TextAsset ta     = AssetDatabase.LoadAssetAtPath <TextAsset>(cfgPath);

        if (ta != null)
        {
            Debug.Log(ta.text);
            mapCfg = JSON.DecodeMap(ta.text);
        }
        editorCfg = WorldmapEditorCfg.parse(mapCfg);
    }