Example #1
0
    public void LoadMap()
    {
        string        path      = MapSetting.MAP_DATA_FOLDER_NAME + MapFileName;
        MapData       mapData   = new MapData(path);
        MapObjectData mapObject = new MapObjectData(path + "_Object");

        DrawingMap.DrawMap(mapData, mapObject, CenterPosition, Quaternion.identity);
    }
Example #2
0
    public void DrawMap()
    {
        mapObjectParent = DrawingMap.DrawMap(MapDataCollection, MapObjectDataCollection, CenterPosition, Quaternion.identity);

        if (IsUsedByEditor)
        {
            AssetCellData[] assets = mapObjectParent.GetComponentsInChildren <AssetCellData>();
            int             len    = assets.Length;
            for (int i = 0; i < len; i++)
            {
                int objectCount = assets[i].MapObj.ObjectDataList.Count;
                for (int j = 0; j < objectCount; j++)
                {
                    onCreateMapObject(assets[i].MapObj.ObjectDataList[j].Go);
                }
            }
        }
    }