Example #1
0
    public void InitMapLittleElementView(MapAsset data)
    {
        MapBlockLoadData blockData = new MapBlockLoadData()
        {
            root          = elementRoot.transform,
            mapAsset      = data,
            disableMaxNum = 50,
            interval      = 8,
            cacheNum      = 50,
            pos           = Vector3.zero,
        };

        LittleElementBlockLoader = new MapBlockLoader(blockData);
    }
Example #2
0
    //初始化
    public void InitMapElementView(MapAsset data)
    {
        elementRoot = new GameObject("MapElement");

        MapBlockLoadData blockData = new MapBlockLoadData()
        {
            root          = elementRoot.transform,
            mapAsset      = data,
            interval      = 16,
            disableMaxNum = 50,
            pos           = Vector3.zero,
        };

        elementBlockLoader = new MapBlockLoader(blockData);
    }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="data">配置文件</param>
 /// <param interval="interval">九宫格大小</param>
 public MapBlockLoader(MapBlockLoadData data)
 {
     if (data != null)
     {
         elementRoot = data.root;
         mapAsset    = data.mapAsset;
         interval    = data.interval;
         buffNum     = data.disableMaxNum;
         cacheNum    = data.cacheNum;
         InitMapAsset(data.pos);
     }
     else
     {
         Debug.LogError("MapData is Error!!!");
     }
 }