protected override IEnumerable <bool> E_Draw() { // ---- game_制御 ---- Game.I.Status.InventoryFlags[GameStatus.Inventory_e.神奈子を倒した] = true; // ---- double targ_x = (Game.I.Map.W * GameConsts.TILE_W) / 2; double targ_y = (Game.I.Map.H * GameConsts.TILE_H) / 2; foreach (DDScene scene in DDSceneUtils.Create(120)) { double xBuru = DDUtils.Random.Real() * 30.0; double yBuru = DDUtils.Random.Real() * 30.0; DDUtils.Approach(ref this.X, targ_x, 0.99); DDUtils.Approach(ref this.Y, targ_y, 0.99); bool facingLeft = scene.Numer / 20 % 2 == 0; //bool facingLeft = Game.I.Player.X < this.X; DDDraw.DrawBegin(Ground.I.Picture2.Enemy_神奈子[10], this.X + xBuru, this.Y + yBuru); DDDraw.DrawZoom_X(facingLeft ? 1 : -1); DDDraw.DrawEnd(); // 当たり判定無し yield return(true); } this.Killed(); Game.I.Enemies.Add(new Enemy_B神奈子9902()); }
public static IEnumerable <bool> 行き先案内(int cycle, double rotAdd, int maxDistance, bool 正しいルート) { double rot = DDUtils.ToAngle(DDEngine.ProcFrame, cycle); foreach (DDScene scene in DDSceneUtils.Create(30)) { double centerX = Game.I.Player.X; double centerY = Game.I.Player.Y; double d = scene.Rate * maxDistance; double x = centerX + Math.Cos(rot) * d; double y = centerY + Math.Sin(rot) * d; I2Point mapPt = GameCommon.ToTablePoint(new D2Point(x, y)); MapCell cell = Game.I.Map.GetCell(mapPt); if (!cell.IsDefault && cell.IsWall()) { DDUtils.Approach(ref cell.ColorPhaseShift, 正しいルート ? -1.0 : 1.0, 0.5); } rot += rotAdd; yield return(true); } }
private IEnumerable <bool> 跳ねて登場() { foreach (var info in new[] { new { f = 60, hi = 100.0 }, new { f = 40, hi = 50.0 }, new { f = 30, hi = 25.0 }, }) { foreach (DDScene scene in DDSceneUtils.Create(info.f)) { double x = this.X; double y = this.Y; y -= DDUtils.Parabola(scene.Rate) * info.hi; this.Real_X = x; this.Real_Y = y; this.DrawYukari(); yield return(true); } } }
private IEnumerable <bool> DrawString(int x, int y, string text, int frameMax = 600) { double b = 0.0; double bTarg = 1.0; foreach (DDScene scene in DDSceneUtils.Create(frameMax)) { if (scene.Numer == scene.Denom - 300) { bTarg = 0.0; } DDUtils.Approach(ref b, bTarg, 0.99); I3Color color = new I3Color( SCommon.ToInt(b * 255), SCommon.ToInt(b * 255), SCommon.ToInt(b * 255) ); DDFontUtils.DrawString(x, y, text, DDFontUtils.GetFont("03\u711a\u706b-Regular", 30), false, color); yield return(true); } }
private IEnumerable <bool> モード変更(string imageFile) { string currImageFile = this.ImageFile; string destImageFile = imageFile; foreach (DDScene scene in DDSceneUtils.Create(30)) { if (Act.IsFlush) { this.A = 1.0; this.ImageFile = destImageFile; yield break; } this.A = DDUtils.Parabola(scene.Rate * 0.5 + 0.5); this.ImageFile = currImageFile; this.P_Draw(); this.A = DDUtils.Parabola(scene.Rate * 0.5 + 0.0); this.ImageFile = destImageFile; this.P_Draw(); yield return(true); } }
public void Test01() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); foreach (DDScene scene in DDSceneUtils.Create(600)) { if (DDInput.A.GetInput() == 1) { break; } { double xRate = DDConsts.Screen_W * 1.0 / Ground.I.Picture.Pic0001.Get_W(); double yRate = DDConsts.Screen_H * 1.0 / Ground.I.Picture.Pic0001.Get_H(); DDDraw.DrawBegin(Ground.I.Picture.Pic0001, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(Math.Max(xRate, yRate)); DDDraw.DrawEnd(); DDCurtain.DrawCurtain(-0.5); DDDraw.DrawBegin(Ground.I.Picture.Pic0001, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(Math.Min(xRate, yRate)); DDDraw.DrawEnd(); } DDEngine.EachFrame(); } DDEngine.FreezeInput(); }
public static IEnumerable <bool> Heavyフラッシュ() { foreach (DDScene scene in DDSceneUtils.Create(90)) { DDCurtain.DrawCurtain((1.0 - scene.Rate) * 0.9); yield return(true); } }
private IEnumerable <bool> E_フラッシュ() { foreach (DDScene scene in DDSceneUtils.Create(40)) { DDCurtain.DrawCurtain((1.0 - scene.Rate) * 0.5); yield return(true); } }
/// <summary> /// throws Cancelled /// </summary> public static void Perform() { DDUtils.SetMouseDispMode(true); DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(10); foreach (DDScene scene in DDSceneUtils.Create(30)) { DDDraw.DrawSimple(Ground.I.Picture.箱から出る_背景, 0, 0); DDDraw.DrawCenter(Ground.I.Picture.箱から出る_箱0001, DDConsts.Screen_W / 2, DDConsts.Screen_H - Ground.I.Picture.箱から出る_箱0001.Get_H() / 2); P_EachFrame(); } for (int c = 0; c < 2; c++) { foreach (DDScene scene in DDSceneUtils.Create(30)) { double x = DDConsts.Screen_W / 2; double y = DDConsts.Screen_H - Ground.I.Picture.箱から出る_箱0001.Get_H() / 2; //double buruSpan = 20.0 * (1.0 - scene.Rate) + 10.0; double buruSpan = 30.0 * (1.0 - scene.Rate); double xBuru = DDUtils.Random.Real() * buruSpan - buruSpan / 2; double yBuru = DDUtils.Random.Real() * buruSpan; double z = 1.0 + 0.2 * (1.0 - scene.Rate); DDDraw.DrawSimple(Ground.I.Picture.箱から出る_背景, 0, 0); DDDraw.DrawBegin(Ground.I.Picture.箱から出る_箱0001, x + xBuru, y + yBuru); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); P_EachFrame(); } } foreach (DDScene scene in DDSceneUtils.Create(50)) { if (scene.Numer == 30) { DDCurtain.SetCurtain(20, -1.0); } double x = DDConsts.Screen_W / 2; double y = DDConsts.Screen_H - Ground.I.Picture.箱から出る_箱0002.Get_H() / 2; double zure = scene.Rate * 10.0; double xZure = zure; double yZure = zure; double z = 1.0 + 0.1 * (1.0 - scene.Rate); DDDraw.DrawSimple(Ground.I.Picture.箱から出る_背景, 0, 0); DDDraw.DrawBegin(Ground.I.Picture.箱から出る_箱0002, x + xZure, y + yZure); DDDraw.DrawZoom(z); DDDraw.DrawEnd(); P_EachFrame(); } }
private IEnumerable <bool> フェードアウト() { foreach (DDScene scene in DDSceneUtils.Create(90)) { this.A = 1.0 - scene.Rate; this.Draw(); ProcMain.WriteLog("Smpl0001_フェードアウト_A: " + this.A); // test yield return(true); } }
private static IEnumerable <bool> E_Leave() { yield return(true); // 1回目のフレームはスルー foreach (DDScene scene in DDSceneUtils.Create(40)) { DrawWall(); DDDraw.DrawSimple(P_Field.ToPicture(), GameConsts.FIELD_L, GameConsts.FIELD_T); DDEngine.EachFrame(); // ここで更に EL が走る。これが駄目なんじゃないか? } }
// <---- Execute() prm public override IEnumerable <bool> E_Task() { for (; ;) { for (int c = 0; c < this.AnimeKomaNum; c++) { foreach (DDScene scene in DDSceneUtils.Create(this.AnimeKomaCycle)) { yield return(this.Draw_KBKFA(c, (c + 1) % this.AnimeKomaNum, scene.Rate)); } } } }
public static void Leave() { DDCurtain.SetCurtain(0, 1.0); DDCurtain.SetCurtain(20); foreach (DDScene scene in DDSceneUtils.Create(40)) { DrawWall(); DDDraw.DrawSimple(P_Field.ToPicture(), GameConsts.FIELD_L, GameConsts.FIELD_T); DDEngine.EachFrame(); } }
private IEnumerable <bool> 待ち(int frame) { foreach (DDScene scene in DDSceneUtils.Create(frame)) { if (Act.IsFlush) { yield break; } this.P_Draw(); yield return(true); } }
public static IEnumerable <bool> PlayerDead(double x, double y) { foreach (DDScene scene in DDSceneUtils.Create(39)) { DDDraw.SetAlpha(0.8); DDDraw.DrawBegin(Ground.I.Picture2.D_PLAYERDIE_00[scene.Numer / 4], x, y); DDDraw.DrawZoom(1.0 + 2.0 * scene.Rate); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
private void LeaveTitleMenu() { DDMusicUtils.Fade(); DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { this.SimpleMenu.WallDrawer(); DDEngine.EachFrame(); } GC.Collect(); }
private void 最終ノベルパート() { using (DDSubScreen tmpScreen = new DDSubScreen(DDConsts.Screen_W, DDConsts.Screen_H)) { DDMain.KeepMainScreen(); using (tmpScreen.Section()) { DDDraw.DrawSimple(DDGround.KeptMainScreen.ToPicture(), 0, 0); } DDCurtain.SetCurtain(0, 0.5); DDCurtain.SetCurtain(20); foreach (DDScene scene in DDSceneUtils.Create(80)) { if (scene.Numer == scene.Denom - 20) { DDCurtain.SetCurtain(20, -1.0); } 白黒効果.Perform(tmpScreen); DDEngine.EachFrame(); } Ground.I.会話スキップ抑止 = !Ground.I.SawFinalNovel; using (new Novel()) { Novel.I.Status.Scenario = GameProgressMaster.I.GetFinalScenario(); Novel.I.Perform(); } Ground.I.会話スキップ抑止 = false; // restore Ground.I.SawFinalNovel = true; DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(); foreach (DDScene scene in DDSceneUtils.Create(40)) { 白黒効果.Perform(tmpScreen); DDEngine.EachFrame(); } DDCurtain.SetCurtain(0, 0.5); DDCurtain.SetCurtain(20); } }
private static IEnumerable <bool> 中爆発Seq(double x, double y) { foreach (DDScene scene in DDSceneUtils.Create(10)) { DDDraw.SetAlpha(0.7); DDDraw.SetBright(1.0, 0.6, 0.3); DDDraw.DrawBegin(DDGround.GeneralResource.WhiteCircle, x - DDGround.ICamera.X, y - DDGround.ICamera.Y); DDDraw.DrawZoom(3.0 * scene.Rate); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
public static IEnumerable <double> E_GetA_フェードイン(Wall wall, int frameMax = 150) { foreach (DDScene scene in DDSceneUtils.Create(frameMax)) { yield return(scene.Rate); } wall.FilledFlag = true; for (; ;) { yield return(1.0); } }
private IEnumerable <bool> E_魔法陣_V(double x, double y) { foreach (DDScene scene in DDSceneUtils.Create(30)) { DDDraw.SetAlpha(0.2 - scene.Rate * 0.2); DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], x, y); DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0); DDDraw.DrawZoom(0.5 + scene.Rate * 1.0); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
public static IEnumerable <bool> PlayerDead(double x, double y) { foreach (DDScene scene in DDSceneUtils.Create(GameConsts.PLAYER_DEAD_FRAME_MAX)) { DDDraw.SetAlpha(0.5); DDDraw.DrawBegin(Ground.I.Picture.Player, x, y); DDDraw.DrawRotate(scene.Rate * 5.0); DDDraw.DrawZoom(1.0 + scene.Rate * 5.0); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
public static IEnumerable <bool> 小爆発(double x, double y) { foreach (DDScene scene in DDSceneUtils.Create(10)) { DDDraw.SetAlpha(1.0 - scene.Rate); DDDraw.SetBright(1.0, 0.5, 1.0); DDDraw.DrawBegin(Ground.I.Picture.WhiteCircle, x - DDGround.ICamera.X, y - DDGround.ICamera.Y); DDDraw.DrawZoom(0.5 + 1.0 * scene.Rate); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
public void Perform() { DDEngine.FreezeInput(); DDCurtain.SetCurtain(0, -1.0); DDCurtain.SetCurtain(); Func <bool> a_script = DDUtils.Scripter(this.Script()); for (int scrfrm = 0; a_script(); scrfrm++) { if (DDInput.L.GetInput() == 1) // エンディング_スキップ { if (Ground.I.会話スキップ抑止) { Ground.I.SE.拒否.Play(); } else if (180 < scrfrm) // 数秒経過するまでスキップさせない。 { DDEngine.EachFrame(); DDCurtain.SetCurtain(30, -1.0); DDMusicUtils.Fade(); for (int c = 0; c < 40; c++) { a_script(); DDEngine.EachFrame(); } break; } } DDEngine.EachFrame(); } // a_script において以下は実行されているものとする。 // -- DDCurtain.SetCurtain(30, -1.0); // -- DDMusicUtils.Fade(); foreach (DDScene scene in DDSceneUtils.Create(60)) // 暗転_時間調整 { DDEngine.EachFrame(); } DDGround.EL.Clear(); DDEngine.FreezeInput(); }
public void Perform() { StringBuilder buff = new StringBuilder(100); // マージンどんくらい要るの? //StringBuilder buff = new StringBuilder(30); DDCurtain.SetCurtain(); DDEngine.FreezeInput(); int inputHdl = DX.MakeKeyInput(30, 1, 0, 0); // ハンドル生成 DX.SetActiveKeyInput(inputHdl); // 入力開始 for (; ;) { if (DX.CheckKeyInput(inputHdl) != 0) // 入力終了 { break; } DDCurtain.DrawCurtain(); DX.DrawKeyInputModeString(100, 100); // IMEモードとか表示 DX.GetKeyInputString(buff, inputHdl); // 現状の文字列を取得 DDPrint.SetPrint(100, 200); DDPrint.Print(buff.ToString()); DX.DrawKeyInputString(100, 300, inputHdl); // 入力中の文字列の描画 DDEngine.EachFrame(); } DX.DeleteKeyInput(inputHdl); // ハンドル開放 DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { DDCurtain.DrawCurtain(); DDPrint.SetPrint(100, 200); DDPrint.Print(buff.ToString()); DDEngine.EachFrame(); } DDEngine.FreezeInput(); }
private void LeaveTitleMenu() { DDMusicUtils.Fade(); DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { DDDraw.SetBright(WALL_COLOR); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); DDDraw.Reset(); DDEngine.EachFrame(); } GC.Collect(); }
private void LeaveTitleMenu() { #if false DDMusicUtils.Fade(); DDCurtain.SetCurtain(30, -1.0); foreach (DDScene scene in DDSceneUtils.Create(40)) { this.DrawWall(); DDEngine.EachFrame(); } #endif GC.Collect(); }
private IEnumerable <bool> フェードイン() { foreach (DDScene scene in DDSceneUtils.Create(60)) { if (NovelAct.IsFlush) { this.A = 1.0; break; } this.A = scene.Rate; this.P_Draw(); yield return(true); } }
public static IEnumerable <bool> EnemyDead(double x, double y) { double r = DDUtils.Random.Real() * Math.PI * 2.0; foreach (DDScene scene in DDSceneUtils.Create(19)) { DDDraw.SetAlpha(0.7); DDDraw.DrawBegin(Ground.I.Picture2.D_ENEMYDIE_00_BGRA[scene.Numer / 2], x, y); DDDraw.DrawRotate(r); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
public override IEnumerable <bool> E_Task() { foreach (DDScene scene in DDSceneUtils.Create(600)) { for (int x = 0; x <= PIECES_W; x++) { for (int y = 0; y <= PIECES_H; y++) { PointTable[x, y] = this.波紋効果による頂点の移動(PointTable[x, y], scene.Rate); } } yield return(true); } }
private IEnumerable <bool> フェードアウト() { foreach (DDScene scene in DDSceneUtils.Create(10)) { if (Act.IsFlush) { this.A = 0.0; yield break; } this.A = 1.0 - scene.Rate; this.P_Draw(); yield return(true); } }