public void Test01() { for (; ;) { DDCurtain.DrawCurtain(); DDDraw.DrawSimple(DDCResource.GetPicture(@"Fairy\Donut3\CResource\Picture\Picture0001.png"), 0, 0); DDDraw.DrawSimple(DDCResource.GetPicture(@"Fairy\Donut3\CResource\Picture\Picture0002.png"), 200, 0); DDDraw.DrawSimple(DDCResource.GetPicture(@"Fairy\Donut3\CResource\Picture\Picture0003.png"), 400, 0); DDEngine.EachFrame(); } }
public void Perform() { if (this.Map.Find(out this.Player.X, out this.Player.Y, cell => cell.Script == "START") == false) { throw new DDError(); } this.Player.Direction = int.Parse(this.Map.GetProperty("START_DIRECTION")); this.WallPicture = DDCResource.GetPicture(this.Map.GetProperty("WALL_PICTURE")); this.GatePicture = DDCResource.GetPicture(this.Map.GetProperty("GATE_PICTURE")); this.BackgroundPicture = DDCResource.GetPicture(this.Map.GetProperty("BACKGROUND_PICTURE")); this.Frame = 0; for (; ; this.Frame++) { if (1 <= DDInput.DIR_8.GetInput()) { foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout, true); this.DrawDungeon(); DDEngine.EachFrame(); } if (this.Map[this.Player.X, this.Player.Y].GetWall(this.Player.Direction).Kind == MapWall.Kind_e.WALL) { // 壁衝突 todo ??? } else { switch (this.Player.Direction) { case 4: this.Player.X--; break; case 6: this.Player.X++; break; case 8: this.Player.Y--; break; case 2: this.Player.Y++; break; default: throw null; // never } } foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout, false); this.DrawDungeon(); DDEngine.EachFrame(); } } if (1 <= DDInput.DIR_4.GetInput()) { foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(scene.Rate); DDEngine.EachFrame(); } this.Player.Direction = Utilities.RotL(this.Player.Direction); foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(-scene.RemainingRate); DDEngine.EachFrame(); } } if (1 <= DDInput.DIR_6.GetInput()) { foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(-scene.Rate); DDEngine.EachFrame(); } this.Player.Direction = Utilities.RotR(this.Player.Direction); foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(scene.RemainingRate); DDEngine.EachFrame(); } } if (1 <= DDInput.DIR_2.GetInput()) { foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(-scene.Rate); DDEngine.EachFrame(); } this.Player.Direction = Utilities.RotR(this.Player.Direction); foreach (DDScene scene in DDSceneUtils.Create(10)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(scene.RemainingRate * 2.0 - 1.0); DDEngine.EachFrame(); } this.Player.Direction = Utilities.RotR(this.Player.Direction); foreach (DDScene scene in DDSceneUtils.Create(5)) { DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(scene.RemainingRate); DDEngine.EachFrame(); } } // Draw ... DungeonScreen.DrawFront(this.Layout); this.DrawDungeon(); DDEngine.EachFrame(); } }