public void Open(FileInfo fileInfo) { AssetLibrary.ClearHeightMaps(); mLevel.IterateOverEveryBlock(RemoveBlockFromSpace, new object[] { Space }); mName = fileInfo.Name; Tuple<Level, List<DummyObject>> loadedLevel = LevelFileLoader.LoadLevelFromFile(fileInfo); mLevel = new ModifiableLevel(loadedLevel.Item1, Space); mLevel.IterateOverEveryBlock(AddBlockToSpace, new object[] { Space }); mDummies = loadedLevel.Item2; }
public void New() { if (mLevel != null) { AssetLibrary.ClearHeightMaps(); mLevel.IterateOverEveryBlock(RemoveBlockFromSpace, new object[] { Space }); } mName = "default"; mLevel = new ModifiableLevel(LevelFileLoader.GenerateNewLevel(mName, "default_terrain_detail"), Space); FileInfo fileInfo = new FileInfo(mName); mLevel.IterateOverEveryBlock(AddBlockToSpace, new object[] { Space }); mSkyBox = new SkyBox("default"); mWater = new Water("waterTexture", 0.1f); }