public void Perform() { Status status = new Status(); for (; ;) { using (Game game = new Game()) { game.Map = MapLoader.Load(Path.Combine(@"Etoile\G4YokoActTM\Map", this.MapFile)); game.Status = status; game.Perform(); switch (game.ExitDir) { case 4: this.Move(-1, 0); status.StartPointIndex = 6; break; case 6: this.Move(1, 0); status.StartPointIndex = 4; break; case 8: this.Move(0, -1); status.StartPointIndex = 2; break; case 2: this.Move(0, 1); status.StartPointIndex = 8; break; case 5: goto endLoop; default: throw null; } } } endLoop: ; }
public void Perform() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); //Ground.I.Music.Title.Play(); string[] items = new string[] { "ゲームスタート", "コンテニュー?", "設定", "終了", }; int selectIndex = 0; this.SimpleMenu = new DDSimpleMenu(); this.SimpleMenu.WallColor = WALL_COLOR; //this.SimpleMenu.WallPicture = Ground.I.Picture.TitleWall; for (; ;) { selectIndex = this.SimpleMenu.Perform("Donut2", items, selectIndex); switch (selectIndex) { case 0: { this.LeaveTitleMenu(); using (World world = new World()) { //world.MapFile = "t0001.txt"; world.Perform(); } #if false // old using (Game game = new Game()) { game.Map = MapLoader.Load(@"Map\t0001.txt"); game.Status = new Status(); game.Perform(); } #endif this.ReturnTitleMenu(); } break; case 1: // TODO break; case 2: this.Setting(); break; case 3: goto endMenu; default: throw new DDError(); } } endMenu: DDEngine.FreezeInput(); DDMusicUtils.Fade(); DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { this.DrawWall(); DDEngine.EachFrame(); } }