//Constructor public Level(PyramidPanic game, int levelIndex) { this.game = game; this.levelIndex = levelIndex; /* System.IO.Stream stream = TitleContainer.OpenStream(@"Content\PlaySceneAssets\Levels\0.txt"); System.IO.StreamReader sreader = new System.IO.StreamReader(stream); // use StreamReader.ReadLine or other methods to read the file data Console.WriteLine("File Size: " + stream.Length); stream.Close(); */ this.levelPath = @"Content\PlaySceneAssets\Levels\" + levelIndex + ".txt"; this.stream = TitleContainer.OpenStream(this.levelPath); //this.levelPath = @"Content\PlaySceneAssets\Levels\0.txt"; //this.levelPath = @"Content\PlaySceneAssets\Levels\" + levelIndex + ".txt"; //eeee //IAsyncResult result = StorageDevice.BeginShowSelector( // PlayerIndex.One, null, null); //StorageDevice device = StorageDevice.EndShowSelector(result); //device.BeginOpenContainer. //eeeee this.LoadAssets(); ExplorerManager.Explorer = this.explorer; this.levelPause = new LevelPause(this); this.levelPlay = new LevelPlay(this); this.levelDoorOpen = new LevelDoorOpen(this); this.levelGameOver = new LevelGameOver(this); this.levelNextLevel = new LevelNextLevel(this); this.levelState = this.levelPlay; this.stream.Close(); }
//constructor public Level(PyramidPanic game, int levelIndex) { this.game = game; this.levelindex = levelindex; this.levelPath = @"Content\PlayScene\Levels\"+ levelIndex +".txt"; this.LoadAssets(); Playermanager.Player = this.Player; this.levelPause = new LevelPause(this); this.levelPlay = new LevelPlay(this); this.levelDoorOpen = new LevelDoorOpen(this); this.levelGameOver = new LevelGameOver(this); this.levelNextLevel = new LevelNextLevel(this); this.levelEndGame = new LevelEndGame(this); this.levelState = this.levelPlay; }