public void init(Vector3 chunkPos) { _chunkPos = chunkPos; _isVisible = false; _levelId = -1; _levelEditor = LevelEditor.Instance; _assetFactory = AssetFactory.Instance; _quadrantFlags = new Dictionary <string, int> (); _worldProps = new Dictionary <GameObject, worldProp> (); _numCubes = 0; }
public void init() { _levelEditor = LevelEditor.Instance; _assetFactory = AssetFactory.Instance; //_iMinLevelCoord = -50; //_iMaxLevelCoord = 50; //_quadrantFlags = new Dictionary<int, Dictionary<int, Dictionary<int, int>>> (); _quadrantFlagsNew = new Dictionary <string, int> (); /*for (int x = _iMinLevelCoord; x <= _iMaxLevelCoord; ++x) { * _quadrantFlags.Add(x, new Dictionary<int, Dictionary<int, int>> ()); * for (int y = _iMinLevelCoord; y <= _iMaxLevelCoord; ++y) { * _quadrantFlags [x].Add(y, new Dictionary<int, int> ()); * for (int z = _iMinLevelCoord; z <= _iMaxLevelCoord; ++z) { * _quadrantFlags [x] [y].Add(z, 0); * } * } * }*/ _visibleQuadrants = new Dictionary <GameObject, bool> (); _aQuadrantChangedVisibility = new List <GameObject> (); _numCubes = 0; //_coroutineIsRunning = false; if (AppController.Instance.editorIsInOfflineMode) { TextAsset levelAsset = Resources.Load <TextAsset>("Data/Levels/Genesis"); string json = levelAsset.text; LevelData.Instance.loadLevelFromJson(json); } else { LevelManager.Instance.loadLevelByIndex(0); } }