コード例 #1
0
ファイル: Level.cs プロジェクト: rexthehero/PyramidPanic
        //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();
        }
コード例 #2
0
ファイル: Level.cs プロジェクト: BIGduzy/Pyramid-Panic
 //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;
 }
コード例 #3
0
ファイル: Level.cs プロジェクト: Bob-Thomas/Pyramid-Panic
 //construction
 public Level(PyramidPanic game,int levelIndex)
 {
     this.game = game;
     this.levelPath = @"Content\PlaySceneAssets\Levels\"+PlayScene.LevelNumber+".txt";
     this.loadAssets();
     this.levelPlay = new LevelPlay(this);
     this.levelPause = new LevelPause(this);
     this.levelOpenDoor = new LevelOpenDoor(this);
     this.levelGameOver = new LevelGameOver(this);
     this.levelNextLevel = new LevelNextLevel(this);
     this.levelVictory = new LevelVictory(this);
     this.levelPaused = new LevelPaused(this);
     this.levelState = new LevelPlay(this);
     Score.Level = this;
     Score.initialize();
 }