Exemplo n.º 1
0
        public InRangeCellInfo StartInstantiatingCell(CELLRecord cell)
        {
            Debug.Assert(cell != null);
            string     cellObjName = null;
            LANDRecord land        = null;

            if (!cell.IsInterior)
            {
                cellObjName = "cell " + cell.GridId.ToString();
                land        = _data.FindLANDRecord(cell.GridId);
            }
            else
            {
                cellObjName = cell.EDID.Value;
            }
            var cellObj = new GameObject(cellObjName)
            {
                tag = "Cell"
            };
            var cellObjectsContainer = new GameObject("objects");

            cellObjectsContainer.transform.parent = cellObj.transform;
            var cellObjectsCreationCoroutine = InstantiateCellObjectsCoroutine(cell, land, cellObj, cellObjectsContainer);

            _loadBalancer.AddTask(cellObjectsCreationCoroutine);
            return(new InRangeCellInfo(cellObj, cellObjectsContainer, cell, cellObjectsCreationCoroutine));
        }
Exemplo n.º 2
0
 static void TestLoadCell(TesDataPack data, Vector3 position)
 {
     var cellId = GetCellId(position, 60);
     var cell   = data.FindCELLRecord(cellId);
     var land   = data.FindLANDRecord(cellId);
 }