private void DrawOnDead(double rate) { DDDraw.SetAlpha(0.3); for (int c = 0; c < 5; c++) { DDDraw.DrawBegin(Ground.I.Picture.WhiteBox, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y); DDDraw.DrawSetSize(GameConsts.TILE_W, GameConsts.TILE_H); double hir = 1.0 + DDUtils.Random.Real() * rate * 3.0; double lwr = 1.0 / hir; hir *= hir; hir *= hir; if (DDUtils.Random.Real() < 0.5) { DDDraw.DrawZoom_X(hir); DDDraw.DrawZoom_Y(lwr); } else { DDDraw.DrawZoom_X(lwr); DDDraw.DrawZoom_Y(hir); } DDDraw.DrawSlide( (DDUtils.Random.Real() - 0.5) * 2.0 * 40.0 * rate, (DDUtils.Random.Real() - 0.5) * 2.0 * 40.0 * rate ); DDDraw.DrawEnd(); } DDDraw.Reset(); }
private IEnumerable <bool> E_DrawItem(int selfIndex) { DDPicture picture = Ground.I.Picture2.TitleMenuItem[0, selfIndex]; const double ITEM_UNSEL_X = 120.0; const double ITEM_UNSEL_A = 0.5; const double ITEM_SEL_X = 140.0; const double ITEM_SEL_A = 1.0; const double ITEM_Y = 195.0; const double ITEM_Y_STEP = 50.0; double x = ITEM_SEL_X; double y = ITEM_Y + selfIndex * ITEM_Y_STEP; double a = ITEM_UNSEL_A; double realX = -100.0 - selfIndex * 200.0; double realY = y; double realA = a; for (; ;) { x = this.SelectIndex == selfIndex ? ITEM_SEL_X : ITEM_UNSEL_X; a = this.SelectIndex == selfIndex ? ITEM_SEL_A : ITEM_UNSEL_A; DDUtils.Approach(ref realX, x, 0.93); DDUtils.Approach(ref realA, a, 0.93); DDDraw.SetAlpha(realA); DDDraw.DrawCenter(picture, realX, realY); DDDraw.Reset(); yield return(true); } }
protected override IEnumerable <bool> E_Draw() { for (this.WaitFrame = 0; ; this.WaitFrame++) { while (DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0)) // 画面外に居るときは休止する。 { yield return(true); } if (!this.Jump()) { this.FacingLeft = Game.I.Player.X < this.X; if ( 30 < this.WaitFrame && ( DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 300.0 || Math.Abs(Game.I.Player.Y - this.Y) < 32.0 )) { this.Jump = SCommon.Supplier(this.E_Jump(this.Random.Real() < 0.5 ? JUMP_SPEED : HI_JUMP_SPEED)); } DDDraw.DrawBegin(Ground.I.Picture.Teki_a03_Jump01, this.X - DDGround.ICamera.X, this.Y - 16 - DDGround.ICamera.Y); DDDraw.DrawZoom_X(this.FacingLeft ? 1.0 : -1.0); DDDraw.DrawEnd(); } this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y + 2.0), 20.0); yield return(true); } }
public override IEnumerable <bool> E_Task() { for (; ;) { if (_lastTopMenuLeaved != TitleMenu.I.DrawWall.TopMenuLeaved) { if (TitleMenu.I.DrawWall.TopMenuLeaved) { foreach (bool v in this.E_Move(_x1, _y1, _x2, _y2, _rot, 0.0)) { yield return(v); } } else { foreach (bool v in this.E_Move(_x2, _y2, _x1, _y1, 0.0, _rot)) { yield return(v); } } _lastTopMenuLeaved = TitleMenu.I.DrawWall.TopMenuLeaved; } if (TitleMenu.I.DrawWall.TopMenuLeaved) { DDDraw.SetBright(_color); DDDraw.DrawBegin(Ground.I.Picture.WhiteBox, _x2, _y2); DDDraw.DrawSetSize(TILE_W, TILE_H); DDDraw.DrawEnd(); DDDraw.Reset(); } 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() { 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); } }
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++) { DDDraw.SetBright(new I3Color(32, 0, 0)); DDDraw.DrawRect(Ground.I.Picture.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); DDDraw.Reset(); if (!this.TopMenuLeaved) { DDPrint.SetBorder(new I3Color(128, 0, 0)); DDPrint.SetPrint(30, 30, 0, 60); DDPrint.Print("ドレミーロックマン(仮)"); DDPrint.Reset(); } el.ExecuteAllTask_Reverse(); yield return(true); } }
public int InvincibleFrame = 0; // 0 == 無効, 0< == 無敵時間中 public void Draw() { if (1 <= this.RebornFrame) { DDDraw.SetAlpha(0.5); DDDraw.DrawCenter(Ground.I.Picture.Player, this.Reborn_X, this.Reborn_Y); DDDraw.Reset(); return; } if (1 <= this.DeadFrame) { // noop // 描画は Game.Perform で行う。 return; } if (1 <= this.InvincibleFrame) { DDDraw.SetAlpha(0.5); DDDraw.DrawCenter(Ground.I.Picture.Player, this.X, this.Y); DDDraw.Reset(); return; } DDDraw.DrawCenter(Ground.I.Picture.Player, this.X, this.Y); }
protected override IEnumerable <bool> E_Draw() { for (int frame = 0; ; frame++) { this.Y -= 18.0; if (this.Y < 0.0) { break; } DDDraw.SetAlpha(ShotConsts.A); DDDraw.DrawBegin(Ground.I.Picture2.D_LASER, this.X, this.Y); DDDraw.DrawZoom(1.0 + (0.5 * this.Level) / GameConsts.PLAYER_LEVEL_MAX); DDDraw.DrawEnd(); DDDraw.Reset(); this.Crash = DDCrashUtils.Circle( new D2Point(this.X, this.Y), 32.0 + (16.0 * this.Level) / GameConsts.PLAYER_LEVEL_MAX ); yield return(true); } }
protected override IEnumerable <bool> E_Draw() { double axisX = this.X; double axisY = this.Y; for (int frame = 0; ; frame++) { axisX += this.XAdd; axisY += this.YAdd; DDUtils.Approach(ref this.R, 0.0, this.RApproachingRate); this.Rot += this.RotAdd; this.X = axisX + Math.Cos(this.Rot) * this.R; this.Y = axisY + Math.Sin(this.Rot) * this.R; EnemyCommon.Shoot(this, this.ShotType); int koma = frame / 5; koma %= 2; DDDraw.SetMosaic(); DDDraw.DrawBegin(Ground.I.Picture2.D_PUMPKIN_00_GRBA[koma], this.X, this.Y); DDDraw.DrawZoom(3.0); DDDraw.DrawEnd(); DDDraw.Reset(); this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y + 4.0), 45.0); yield return(!EnemyCommon.IsEvacuated(this)); } }
private static IEnumerable <object> GetSequencer() { for (; ;) { { int slide = (int)((Game.I.Frame * 7L) % 180L); for (int dx = -slide; dx < DDConsts.Screen_W; dx += 180) { for (int dy = 0; dy < DDConsts.Screen_H; dy += 180) { DDDraw.DrawSimple(Ground.I.Picture.Wall0001, dx, dy); } } } { int slide = (int)((Game.I.Frame * 17L) % 90L); for (int dx = -slide; dx < DDConsts.Screen_W; dx += 90) { for (int dy = 0; dy < DDConsts.Screen_H; dy += 90) { DDDraw.DrawSimple(Ground.I.Picture.Wall0003, dx, dy); } } } yield return(null); } }
protected override IEnumerable <bool> E_Draw() { for (; ;) { if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0) // ? 十分に接近 -> 取得する。 { Game.I.Status.InventoryFlags[GameStatus.Inventory_e.取得済み_跳ねる陰陽玉] = true; break; } if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0)) { DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y); DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0); DDDraw.DrawEnd(); DDPrint.SetDebug((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y); DDPrint.SetBorder(new I3Color(0, 0, 0)); DDPrint.PrintLine("跳ねる陰陽玉"); DDPrint.Reset(); // 当たり判定無し } yield return(true); } }
protected override IEnumerable <bool> E_Draw() { double xSpeed = 1.0; for (; ;) { xSpeed -= 0.1; this.X += xSpeed; if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 60.0) { this.プレイヤーがアイテムを取得した(); break; } DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X, this.Y); DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0); DDDraw.DrawEnd(); DDPrint.SetPrint((int)this.X, (int)this.Y); DDPrint.SetBorder(new I3Color(0, 0, 0)); DDPrint.PrintLine("アイテム"); DDPrint.PrintLine("効用:" + 効用_e_Names[(int)this.効用]); DDPrint.Reset(); // 当たり判定無し yield return(true); } }
private IEnumerable <bool> GetLayer04(string imgFile) { DDPicture img = DDPictureLoaders.Standard(imgFile); // g double y = -190.0; double a = 0.0; double spa = 0.0; SpectrumScreen0001 spScr = new SpectrumScreen0001(); for (int frmcnt = 0; ; frmcnt++) { DDDraw.DrawBegin(img, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2 - y); DDDraw.DrawZoom(1.353); DDDraw.SetAlpha(a); DDDraw.DrawEnd(); spScr.Draw(this.SpData.Rows[this.Frame]); DDDraw.DrawBegin(DDPictureLoaders2.Wrapper(spScr.Screen), 1500, 400); DDDraw.SetAlpha(spa); DDDraw.DrawZoom(0.75); DDDraw.DrawEnd(); DDUtils.Approach(ref y, 190.0, 0.9995); DDUtils.Approach(ref a, 1.0, 0.9); if (60 < frmcnt) { DDUtils.Approach(ref spa, 1.0, 0.95); } yield return(true); } }
private void DrawWall() { DDDraw.SetBright(new I3Color(0, 0, 64)); DDDraw.DrawRect(DDGround.GeneralResource.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); DDDraw.Reset(); //DDDraw.DrawRect(Ground.I.Picture.TitleWall, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); }
protected override IEnumerable <bool> E_Draw() { double axisX = this.X; for (int frame = 0; ; frame++) { this.X = axisX + Math.Sin(this.Rot) * this.XRate; this.Y += this.YAdd; this.Rot += this.RotAdd; EnemyCommon.Shoot(this, this.ShotType); int koma = frame / 7; koma %= 2; DDDraw.SetMosaic(); DDDraw.DrawBegin(Ground.I.Picture2.D_PUMPKIN_00[koma], this.X, this.Y); DDDraw.DrawZoom(2.0); DDDraw.DrawEnd(); DDDraw.Reset(); this.Crash = DDCrashUtils.Circle(new D2Point(this.X - 1.0, this.Y + 3.0), 30.0); yield return(!EnemyCommon.IsEvacuated(this)); } }
public override IEnumerable <bool> E_Task() { DDPicture picture = new DDPicture[] { Ground.I.Picture.TitleMenuItem_はじめから, Ground.I.Picture.TitleMenuItem_つづきから, Ground.I.Picture.TitleMenuItem_設定, Ground.I.Picture.TitleMenuItem_終了, } [this.SelfIndex]; double targX = ITEM_X; double targA = ITEM_A; double x = targX; double y = ITEM_Y + this.SelfIndex * ITEM_Y_STEP; double a = targA; for (; ;) { targX = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_X : ITEM_X; targA = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_A : ITEM_A; DDUtils.Approach(ref x, targX, 0.93); DDUtils.Approach(ref a, targA, 0.93); DDDraw.SetAlpha(a); DDDraw.DrawCenter(picture, x, y); DDDraw.Reset(); this.Selected = !DDUtils.IsOut(new D2Point(DDMouse.X, DDMouse.Y), new D4Rect(ITEM_X - ITEM_W / 2, y - ITEM_H / 2, ITEM_W, ITEM_H)); yield return(true); } }
public void Test02() { DDPicture title_wall = DDPictureLoaders.Standard("title_wall.png"); for (; ;) { DDDraw.DrawFree( title_wall, new D2Point( Math.Cos(DDEngine.ProcFrame / 11.0) * 100 + 100, Math.Sin(DDEngine.ProcFrame / 11.0) * 100 + 100 ), new D2Point( Math.Cos(DDEngine.ProcFrame / 13.0) * 100 + 700, Math.Sin(DDEngine.ProcFrame / 13.0) * 100 + 100 ), new D2Point( Math.Cos(DDEngine.ProcFrame / 17.0) * 100 + 700, Math.Sin(DDEngine.ProcFrame / 17.0) * 100 + 500 ), new D2Point( Math.Cos(DDEngine.ProcFrame / 19.0) * 100 + 100, Math.Sin(DDEngine.ProcFrame / 19.0) * 100 + 500 ) ); DDEngine.EachFrame(); } }
protected override IEnumerable <bool> E_Draw() { double ySpeed = 0.0; const double GRAVITY = 1.0; const double SPEED_Y_MAX = 8.0; for (; ;) { this.Y += ySpeed; ySpeed += GRAVITY; ySpeed = Math.Min(ySpeed, SPEED_Y_MAX); if (Game.I.Map.GetCell(GameCommon.ToTablePoint(new D2Point(this.X, this.Y))).Tile.IsGround()) // ? 地面に落ちた。 { break; } DDDraw.DrawCenter(Ground.I.Picture.Teki_a01_Shit01, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y); this.Crash = DDCrashUtils.Point(new D2Point(this.X, this.Y)); yield return(true); } }
protected override IEnumerable <bool> E_Draw() { for (; ;) { if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0) { this.プレイヤーがアイテムを取得した(); break; } if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0)) { DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y); DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0); DDDraw.DrawEnd(); DDPrint.SetDebug((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y); DDPrint.SetBorder(new I3Color(0, 0, 0)); DDPrint.PrintLine("アイテム"); DDPrint.PrintLine("効用:" + 効用_e_Names[(int)this.効用]); DDPrint.Reset(); // 当たり判定無し } yield return(true); } }
public override IEnumerable <bool> E_Task() { DDPicture picture = Ground.I.Picture.TitleMenuItems[this.SelfIndex]; double targX = ITEM_UNSEL_X; double targA = ITEM_UNSEL_A; double x = targX; double y = ITEM_Y + this.SelfIndex * ITEM_Y_STEP; double a = targA; for (; ;) { targX = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_X : ITEM_UNSEL_X; targA = TitleMenu.I.TopMenu.SelectIndex == this.SelfIndex ? ITEM_SEL_A : ITEM_UNSEL_A; DDUtils.Approach(ref x, targX, 0.93); DDUtils.Approach(ref a, targA, 0.93); DDDraw.SetAlpha(a); DDDraw.DrawCenter(picture, x, y); DDDraw.Reset(); yield return(true); } }
protected override IEnumerable <bool> E_Draw() { for (; ;) { if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0) { GameCommon.SaveGame(); break; } if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0)) { DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y); DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0); DDDraw.DrawEnd(); DDPrint.SetPrint((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y); DDPrint.SetBorder(new I3Color(0, 0, 0)); DDPrint.PrintLine("セーブ地点"); DDPrint.Reset(); // 当たり判定無し } yield return(true); } }
public override void Draw() { if (Game.I.FreezeEnemy) { goto startDraw; } this.IRot += this.IRotSpeed; this.IRot += IROT_360; this.IRot %= IROT_360; startDraw: double rot = this.IRot * (Math.PI * 2.0) / IROT_360; double x = this.X + Math.Cos(rot) * R; double y = this.Y + Math.Sin(rot) * R; if (!EnemyCommon.IsOutOfScreen_ForDraw(new D2Point(x - DDGround.Camera.X, y - DDGround.Camera.Y))) { //DDDraw.SetBright(new I3Color(32, 192, 32)); // old DDDraw.SetBright(Game.I.Map.Design.EnemyColor_Cookie); DDDraw.DrawBegin(Ground.I.Picture.WhiteBox, SCommon.ToInt(x - DDGround.ICamera.X), SCommon.ToInt(y - DDGround.ICamera.Y)); DDDraw.DrawSetSize(GameConsts.TILE_W, GameConsts.TILE_H); DDDraw.DrawEnd(); DDDraw.Reset(); this.Crash = DDCrashUtils.Rect_CenterSize(new D2Point(x, y), new D2Size(GameConsts.TILE_W, GameConsts.TILE_H)); Game.I.タイル接近_敵描画_Points.Add(new D2Point(x, y)); } }
public static void Draw(double x, double y) { int picIndex; double xZoom; { const double MARGIN = 2.0; if (x < Last_X - MARGIN) { picIndex = 1; xZoom = 1.0; } else if (Last_X + MARGIN < x) { picIndex = 1; xZoom = -1.0; } else { picIndex = 0; xZoom = 1.0; } } Last_X = x; DDDraw.DrawBegin(Ground.I.Picture2.ルーミア[picIndex], x, y); DDDraw.DrawZoom_X(xZoom); DDDraw.DrawEnd(); }
private IEnumerable <bool> Effect_0001(double dx, double dy, double dxa, double dya) { double x = DDConsts.Screen_W / 2; double y = DDConsts.Screen_H / 2; double a = 1.0; double z = 1.3; double r = 0.0; double xa = DDUtils.Random.Real() * 0.01; double ya = DDUtils.Random.Real() * 0.01; double aa = -0.007 - DDUtils.Random.Real() * 0.003; double za = DDUtils.Random.Real() * 0.00006 - 0.00002; double ra = DDUtils.Random.Real() < 0.3 ? DDUtils.Random.Real() * 0.003 - 0.0015 : 0.0; while (0.003 < a) { DDDraw.SetAlpha(a); DDDraw.DrawBegin(Ground.I.Picture.TitleWall, x, y); DDDraw.DrawZoom(z); DDDraw.DrawSlide(dx, dy); DDDraw.DrawRotate(r); DDDraw.DrawEnd(); DDDraw.Reset(); x += xa + dxa; y += ya + dya; a += aa; z += za; r += ra; dxa *= 0.99; dya *= 0.99; yield return(true); } }
private static void Draw垂直体力ゲージ(double hp) { const int L = 20; const int T = 20; const int W = 20; const int H = DDConsts.Screen_H - 40; int rem_h = (int)(H * hp); int emp_h = H - rem_h; const double a = 0.5; if (1 <= emp_h) { DDDraw.SetAlpha(a); DDDraw.DrawRect(Ground.I.Picture.WhiteBox, L, T, W, emp_h); DDDraw.Reset(); } if (1 <= rem_h) { DDDraw.SetAlpha(a); DDDraw.SetBright(1.0, 0.0, 0.0); DDDraw.DrawRect(Ground.I.Picture.WhiteBox, L, T + emp_h, W, rem_h); DDDraw.Reset(); } }
protected override IEnumerable <bool> E_Draw() { for (int frame = 0; ; frame++) { double ax = 0.0; double ay = -15.0; DDUtils.Rotate(ref ax, ref ay, this.R); this.X += ax; this.Y += ay; //if (DDUtils.IsOut(new D2Point(this.X, this.Y), new D4Rect(0, 0, GameConsts.FIELD_W, GameConsts.FIELD_H))) // break; this.R += this.RAdd; DDUtils.Approach(ref this.RAdd, 0.0, this.RAddRatePerFrame); DDDraw.SetAlpha(ShotConsts.A * 2.0); DDDraw.SetBright(1.0, 0.3, 0.3); DDDraw.DrawBegin(Ground.I.Picture2.D_WAVESHOT, this.X, this.Y); DDDraw.DrawRotate(this.R); DDDraw.DrawEnd(); DDDraw.Reset(); this.Crash = DDCrashUtils.Circle( new D2Point(this.X, this.Y), 24.0 ); yield return(true); } }
private IEnumerable <bool> Circle(double target_a, double target_z, double z, double r_add) { double a = 0.0; double r = 0.0; for (int frame = 0; ; frame++) { if (frame == GameConsts.PLAYER_BOMB_FRAME_MAX) { target_a = 0.0; } DDUtils.Approach(ref a, target_a, 0.9); DDUtils.Approach(ref z, target_z, 0.9); r += r_add; DDDraw.SetAlpha(a); DDDraw.DrawBegin(Ground.I.Picture2.D_DECOCIRCLE, this.X, this.Y); DDDraw.DrawZoom(z); DDDraw.DrawRotate(r); DDDraw.DrawEnd(); DDDraw.Reset(); yield return(true); } }
public override IEnumerable <bool> E_Draw() { for (; ;) { DDUtils.Approach(ref this.A, this.Ended ? 0.0 : 1.0, 0.9); DDDraw.SetAlpha(this.A); DDDraw.DrawBegin(Ground.I.Picture.MessageWindow, this.X, this.Y); DDDraw.DrawZoom_X(this.LeftSide ? 1.0 : -1.0); DDDraw.DrawZoom_Y(-1.0); DDDraw.DrawEnd(); DDDraw.Reset(); if (!this.Ended) { DDPrint.SetBorder(new I3Color(40, 0, 0)); DDPrint.SetPrint( (int)this.X - 200, (int)this.Y - 0 ); DDPrint.PrintLine(this.Messages[0]); DDPrint.PrintLine(""); DDPrint.PrintLine(this.Messages[1]); DDPrint.Reset(); } yield return(!this.Ended || 0.003 < this.A); } }
private static void DrawDungWall(MapWall.Kind_e kind, P4Poly poly, double y) { DDPicture picture; switch (kind) { case MapWall.Kind_e.NONE: return; case MapWall.Kind_e.WALL: picture = Layout.GetWallPicture(); break; case MapWall.Kind_e.WALL_BACK: picture = Layout.GetWallBackPicture(); break; case MapWall.Kind_e.GATE: picture = Layout.GetGatePicture(); break; default: throw null; // never } double bright = 1.0 - y / 6.0; DDDraw.SetBright(bright, bright, bright); DDDraw.DrawFree(picture, poly); DDDraw.Reset(); }