public override IEnumerable <bool> E_Task() { DDPicture picture = Ground.I.Picture.Title; double slideRate = 0.0; double leaveRate = 0.0; double z = 1.0; for (; ;) { DDUtils.Approach(ref slideRate, 1.0, 0.9999); DDUtils.Approach(ref leaveRate, this.TopMenuLeaved ? 1.0 : 0.0, 0.95); DDUtils.Approach(ref z, this.TopMenuLeaved ? 1.02 : 1.0, 0.9); D4Rect drawRect = DDUtils.AdjustRectExterior( picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H), slideRate ); DDDraw.DrawBeginRect(Ground.I.Picture.Title, drawRect.L, drawRect.T, drawRect.W, drawRect.H); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); if (0.01 < leaveRate) { ぼかし効果.Perform(leaveRate); DDCurtain.DrawCurtain(-0.6 * leaveRate); } yield return(true); } }
/// <summary> /// ゲーム中のロード画面 /// </summary> private void LoadMenu() { using (new SaveOrLoadMenu()) { SaveDataSlot sdSlot = SaveOrLoadMenu.I.Load(() => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.5); }); if (sdSlot != null) { this.Status = GameStatus.Deserialize(sdSlot.SerializedGameStatus); this.CurrPage = this.Status.Scenario.Pages[this.Status.CurrPageIndex]; this.DispSubtitleCharCount = 0; this.DispCharCount = 0; this.DispPageEndedCount = 0; this.DispFastMode = false; } } DDEngine.FreezeInput(GameConsts.LONG_INPUT_SLEEP); }
public override IEnumerable <bool> E_Task() { DDTaskList el = new DDTaskList(); //el.Add(SCommon.Supplier(this.Effect_0001(1, 2, 3))); //el.Add(SCommon.Supplier(this.Effect_0001(4, 5, 6))); //el.Add(SCommon.Supplier(this.Effect_0001(7, 8, 9))); for (int frame = 0; ; frame++) { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.8); if (!this.TopMenuLeaved) { DDPrint.SetBorder(new I3Color(128, 0, 0)); DDPrint.SetPrint(75, 110, 0, 60); DDPrint.Print("横スクロール アクション(仮)"); DDPrint.Reset(); } el.ExecuteAllTask_Reverse(); yield return(true); } }
// <---- prm public void Draw() { DDUtils.Approach(ref this.SlideRate, this.DestSlideRate, 0.9999); DDPicture picture = DDCCResource.GetPicture(this.ImageFile); D2Size size = DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)).Size; DDDraw.SetAlpha(this.A); DDDraw.DrawRect( picture, (DDConsts.Screen_W - size.W) * this.SlideRate, (DDConsts.Screen_H - size.H) * this.SlideRate, size.W, size.H ); DDDraw.Reset(); }
/// <summary> /// ゲーム中のセーブ画面 /// </summary> private void SaveMenu() { using (new SaveOrLoadMenu()) { SaveOrLoadMenu.I.Save(() => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.5); }); } DDEngine.FreezeInput(GameConsts.LONG_INPUT_SLEEP); }
/// <summary> /// システムメニュー画面 /// </summary> private void SystemMenu() { this.SystemMenu_ReturnToTitleMenu = false; // reset DDSimpleMenu simpleMenu = new DDSimpleMenu() { Color = new I3Color(255, 255, 255), BorderColor = new I3Color(0, 64, 0), //WallPicture = Ground.I.Picture.Title, //WallCurtain = -0.5, WallDrawer = () => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDDraw.SetAlpha(0.5); DDDraw.SetBright(0, 0, 0); DDDraw.DrawRect(Ground.I.Picture.WhiteBox, 0, DDConsts.Screen_H / 4, DDConsts.Screen_W, DDConsts.Screen_H / 2); DDDraw.Reset(); }, X = 150, Y = DDConsts.Screen_H / 4 + 150, }; int selectIndex = 0; for (; ;) { selectIndex = simpleMenu.Perform( "システムメニュー", new string[] { "設定", "タイトルに戻る", "ゲームに戻る", }, selectIndex ); switch (selectIndex) { case 0: using (new SettingMenu()) { SettingMenu.I.Perform(() => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.5); }); } break; case 1: if (new Confirm().Perform("タイトル画面に戻ります。", "はい", "いいえ") == 0) { this.SystemMenu_ReturnToTitleMenu = true; goto endLoop; } break; case 2: goto endLoop; default: throw null; // never } //DDEngine.EachFrame(); // 不要 } endLoop: DDEngine.FreezeInput(GameConsts.LONG_INPUT_SLEEP); }
public void Perform() { DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(); DDEngine.FreezeInput(); Ground.I.Music.Title.Play(); string[] items = new string[] { "ゲームスタート", "コンテニュー", "設定", "終了", }; int selectIndex = 0; this.SimpleMenu = new DDSimpleMenu() { BorderColor = new I3Color(64, 0, 0), WallDrawer = () => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDDraw.SetMosaic(); DDDraw.DrawBegin( Ground.I.Picture.PlayerStands[DDEngine.ProcFrame / 120 % 2][DDEngine.ProcFrame / 30 % 2], 610, 392 ); DDDraw.DrawZoom_X(-1.0); DDDraw.DrawZoom(14.0); DDDraw.DrawEnd(); DDDraw.Reset(); DDCurtain.DrawCurtain(-0.4); }, }; for (; ;) { selectIndex = this.SimpleMenu.Perform(40, 40, 40, 24, "横スクロール アクション ゲーム(仮)", items, selectIndex); bool cheatFlag; { int bk_freezeInputFrame = DDEngine.FreezeInputFrame; DDEngine.FreezeInputFrame = 0; cheatFlag = 1 <= DDInput.DIR_6.GetInput(); DDEngine.FreezeInputFrame = bk_freezeInputFrame; } switch (selectIndex) { case 0: if (DDConfig.LOG_ENABLED && cheatFlag) { this.CheatMainMenu(); } else { this.LeaveTitleMenu(); using (new WorldGameMaster()) { WorldGameMaster.I.World = new World("Start"); WorldGameMaster.I.Status = new GameStatus(); WorldGameMaster.I.Perform(); } this.ReturnTitleMenu(); } break; case 1: { Ground.P_SaveDataSlot saveDataSlot = LoadGame(); if (saveDataSlot != null) { this.LeaveTitleMenu(); using (new WorldGameMaster()) { WorldGameMaster.I.World = new World(saveDataSlot.MapName); WorldGameMaster.I.Status = saveDataSlot.GameStatus.GetClone(); WorldGameMaster.I.Status.StartPointDirection = 101; // スタート地点を「ロード地点」にする。 WorldGameMaster.I.Perform(); } this.ReturnTitleMenu(); } } break; case 2: using (new SettingMenu() { SimpleMenu = this.SimpleMenu, }) { SettingMenu.I.Perform(); } break; case 3: goto endMenu; default: throw new DDError(); } } endMenu: DDMusicUtils.Fade(); DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { this.SimpleMenu.WallDrawer(); DDEngine.EachFrame(); } DDEngine.FreezeInput(); }
public void Perform() { DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(); DDEngine.FreezeInput(); Ground.I.Music.Title.Play(); string[] items = new string[] { "ゲームスタート", "コンテニュー", "設定", "終了", }; int selectIndex = 0; this.SimpleMenu = new DDSimpleMenu() { BorderColor = new I3Color(64, 0, 0), WallDrawer = () => { DDPicture picture = Ground.I.Picture.Title; DDDraw.DrawRect( picture, DDUtils.AdjustRectExterior(picture.GetSize().ToD2Size(), new D4Rect(0, 0, DDConsts.Screen_W, DDConsts.Screen_H)) ); DDCurtain.DrawCurtain(-0.4); }, }; for (; ;) { selectIndex = this.SimpleMenu.Perform(40, 40, 40, 24, "横スクロール アクションゲーム タイプ-M テストコード / タイトルメニュー", items, selectIndex); switch (selectIndex) { case 0: { this.LeaveTitleMenu(); using (new WorldGameMaster()) { WorldGameMaster.I.World = new World("t0001"); // マップ名_仮? WorldGameMaster.I.Status = new GameStatus(); WorldGameMaster.I.Perform(); } this.ReturnTitleMenu(); } break; case 1: { Ground.P_SaveDataSlot saveDataSlot = LoadGame(); if (saveDataSlot != null) { this.LeaveTitleMenu(); using (new WorldGameMaster()) { WorldGameMaster.I.World = new World(saveDataSlot.MapName); WorldGameMaster.I.Status = saveDataSlot.GameStatus.GetClone(); WorldGameMaster.I.Status.StartPointDirection = 101; // スタート地点を「ロード地点」にする。 WorldGameMaster.I.Perform(); } this.ReturnTitleMenu(); } } break; case 2: using (new SettingMenu() { SimpleMenu = this.SimpleMenu, }) { SettingMenu.I.Perform(); } break; case 3: goto endMenu; default: throw new DDError(); } } endMenu: DDMusicUtils.Fade(); DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { this.SimpleMenu.WallDrawer(); DDEngine.EachFrame(); } DDEngine.FreezeInput(); }