private static string GetMeterString(int value, int minval, int maxval, int meterLen) { int indicatorPos; if (value == minval) { indicatorPos = 0; } else if (value == maxval) { indicatorPos = meterLen - 1; } else { indicatorPos = SCommon.ToRange( SCommon.ToInt(DDUtils.RateAToB(minval, maxval, value) * (meterLen - 1)), 1, meterLen - 2 ); } StringBuilder buff = new StringBuilder(); buff.Append("["); for (int index = 0; index < meterLen; index++) { buff.Append(index == indicatorPos ? "■" : "-"); } buff.Append("] "); buff.Append(value); return(buff.ToString()); }
private static void CheckHz() { long currTime = DDUtils.GetCurrTime(); if (1 <= SlowdownLevel) { HzChaserTime += (long)(16.666 * SlowdownLevel); // テスト用 } else { HzChaserTime += 16L; // 16.666 == 60Hz } //HzChaserTime += (long)(16.666 * 8); // test //HzChaserTime += (long)(16.666 * 4); // test //HzChaserTime += (long)(16.666 * 2); // test //HzChaserTime += 16L; // 16.666 == 60Hz HzChaserTime = SCommon.ToRange(HzChaserTime, currTime - 100L, currTime + 100L); while (currTime < HzChaserTime) { Thread.Sleep(1); currTime = DDUtils.GetCurrTime(); } FrameStartTime = currTime; }
public static void SetAlpha(double a) { int pal = SCommon.ToInt(a * 255.0); pal = SCommon.ToRange(pal, 0, 255); Extra.A = pal; }
public static void SetBlendAdd(double a) { int pal = SCommon.ToInt(a * 255.0); pal = SCommon.ToRange(pal, 0, 255); Extra.BlendAdd = pal; }
public static void SetBright(I3Color color) { color.R = SCommon.ToRange(color.R, 0, 255); color.G = SCommon.ToRange(color.G, 0, 255); color.B = SCommon.ToRange(color.B, 0, 255); Extra.Bright = color; }
public static double MixVolume(double volume1, double volume2) { volume1 = SCommon.ToRange(volume1, 0.0, 1.0); volume2 = SCommon.ToRange(volume2, 0.0, 1.0); double mixedVolume = volume1 * volume2 * 2.0; mixedVolume = SCommon.ToRange(mixedVolume, 0.0, 1.0); return(mixedVolume); }
public static void SetSoftImageDot(int siHandle, int x, int y, Dot dot) { dot.R = SCommon.ToRange(dot.R, 0, 255); dot.G = SCommon.ToRange(dot.G, 0, 255); dot.B = SCommon.ToRange(dot.B, 0, 255); dot.A = SCommon.ToRange(dot.A, 0, 255); if (DX.DrawPixelSoftImage(siHandle, x, y, dot.R, dot.G, dot.B, dot.A) != 0) { throw new DDError(); } }
public static void SetBright(double r, double g, double b) { int pR = SCommon.ToInt(r * 255.0); int pG = SCommon.ToInt(g * 255.0); int pB = SCommon.ToInt(b * 255.0); pR = SCommon.ToRange(pR, 0, 255); pG = SCommon.ToRange(pG, 0, 255); pB = SCommon.ToRange(pB, 0, 255); Extra.Bright = new I3Color(pR, pG, pB); }
private static void CheckHz() { long currTime = DDUtils.GetCurrTime(); HzChaserTime += 16L; // 16.666 == 60Hz HzChaserTime = SCommon.ToRange(HzChaserTime, currTime - 100L, currTime + 100L); while (currTime < HzChaserTime) { Thread.Sleep(1); currTime = DDUtils.GetCurrTime(); } FrameStartTime = currTime; }
public static void SetVolume(int handle, double volume) { volume = SCommon.ToRange(volume, 0.0, 1.0); int pal = SCommon.ToInt(volume * 255.0); if (pal < 0 || 255 < pal) { throw new DDError(); // 2bs } if (DX.ChangeVolumeSoundMem(pal, handle) != 0) // ? 失敗 { throw new DDError(); } }
private void DrawMap() { int w = this.Map.W; int h = this.Map.H; int cam_l = DDGround.ICamera.X; int cam_t = DDGround.ICamera.Y; int cam_r = cam_l + DDConsts.Screen_W; int cam_b = cam_t + DDConsts.Screen_H; I2Point lt = GameCommon.ToTablePoint(cam_l, cam_t); I2Point rb = GameCommon.ToTablePoint(cam_r, cam_b); // マージン付与 // -- マップセルの範囲をはみ出て描画されるタイルのためにマージンを増やす。 { lt.X -= 2; lt.Y -= 2; rb.X += 2; rb.Y += 2; } lt.X = SCommon.ToRange(lt.X, 0, w - 1); lt.Y = SCommon.ToRange(lt.Y, 0, h - 1); rb.X = SCommon.ToRange(rb.X, 0, w - 1); rb.Y = SCommon.ToRange(rb.Y, 0, h - 1); for (int x = lt.X; x <= rb.X; x++) { for (int y = lt.Y; y <= rb.Y; y++) { MapCell cell = this.Map.Table[x, y]; int tileX = x * GameConsts.TILE_W + GameConsts.TILE_W / 2; int tileY = y * GameConsts.TILE_H + GameConsts.TILE_H / 2; cell.Tile.Draw(tileX - cam_l, tileY - cam_t, x, y); } } }
public static void EachFrame() { uint status; if (DDEngine.WindowIsActive) { _rot = DX.GetMouseWheelRotVol(); status = (uint)DX.GetMouseInput(); } else { _rot = 0; status = 0u; } _rot = SCommon.ToRange(_rot, -SCommon.IMAX, SCommon.IMAX); DDUtils.UpdateInput(ref L.Status, (status & (uint)DX.MOUSE_INPUT_LEFT) != 0u); DDUtils.UpdateInput(ref R.Status, (status & (uint)DX.MOUSE_INPUT_RIGHT) != 0u); DDUtils.UpdateInput(ref M.Status, (status & (uint)DX.MOUSE_INPUT_MIDDLE) != 0u); UpdatePos_EF(); }
public static void DrawCurtain(double whiteLevel = -1.0) { if (whiteLevel == 0.0) { return; } whiteLevel = SCommon.ToRange(whiteLevel, -1.0, 1.0); if (whiteLevel < 0.0) { DDDraw.SetAlpha(-whiteLevel); DDDraw.SetBright(0.0, 0.0, 0.0); } else { DDDraw.SetAlpha(whiteLevel); } DDDraw.DrawRect(Ground.I.Picture.WhiteBox, 0, 0, DDConsts.Screen_W, DDConsts.Screen_H); DDDraw.Reset(); }
public void Test01() { DDPicture[][] motions = new DDPicture[][] { Ground.I.Picture2.ほむらシールド, Ground.I.Picture2.ほむらバズーカ, Ground.I.Picture2.ほむら死亡, Ground.I.Picture2.ほむら走り, Ground.I.Picture2.ほむら滞空攻撃, Ground.I.Picture2.ほむら被弾, Ground.I.Picture2.ほむら立ち, Ground.I.Picture2.さやか死亡, Ground.I.Picture2.さやか接地攻撃, Ground.I.Picture2.さやか走り, Ground.I.Picture2.さやか滞空攻撃, Ground.I.Picture2.さやか突き, Ground.I.Picture2.さやか被弾, Ground.I.Picture2.さやか立ち, }; DDEngine.FreezeInput(); int motionIndex = 0; int komaIndex = 0; for (int frame = 0; ; frame++) { if (DDInput.DIR_8.IsPound()) { motionIndex--; } if (DDInput.DIR_2.IsPound()) { motionIndex++; } if (DDInput.DIR_4.IsPound()) { komaIndex--; } if (DDInput.DIR_6.IsPound()) { komaIndex++; } motionIndex += motions.Length; motionIndex %= motions.Length; DDPicture[] motion = motions[motionIndex]; komaIndex = SCommon.ToRange(komaIndex, -1, motion.Length - 1); int koma = komaIndex; if (koma == -1) { koma = (frame / 5) % motion.Length; } DDCurtain.DrawCurtain(1.0); DDCurtain.DrawCurtain(-0.5); DDPrint.SetPrint(); DDPrint.Print(string.Join(", ", motionIndex, komaIndex, koma)); DDDraw.DrawCenter(motion[koma], DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawBegin(Ground.I.Picture.Dummy, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(0.1); DDDraw.DrawEnd(); DDEngine.EachFrame(); } }
public int IntVolumeConfig(string title, int value, int minval, int maxval, int valStep, int valFastStep, Action <int> valChanged, Action pulse) { const int PULSE_FRM = 60; int origval = value; DDCurtain.SetCurtain(); DDEngine.FreezeInput(); for (; ;) { bool chgval = false; if (DDInput.A.GetInput() == 1 || this.MouseUsable && DDMouse.L.GetInput() == -1) { break; } if (DDInput.B.GetInput() == 1 || this.MouseUsable && DDMouse.R.GetInput() == -1) { if (value == origval) { break; } value = origval; chgval = true; } if (this.MouseUsable) { value += DDMouse.Rot; chgval = true; } if (DDInput.DIR_8.IsPound()) { value += valFastStep; chgval = true; } if (DDInput.DIR_6.IsPound()) { value += valStep; chgval = true; } if (DDInput.DIR_4.IsPound()) { value -= valStep; chgval = true; } if (DDInput.DIR_2.IsPound()) { value -= valFastStep; chgval = true; } if (chgval) { value = SCommon.ToRange(value, minval, maxval); valChanged(value); } if (DDEngine.ProcFrame % PULSE_FRM == 0) { pulse(); } this.DrawWall(); if (this.Color != null) { DDPrint.SetColor(this.Color.Value); } if (this.BorderColor != null) { DDPrint.SetBorder(this.BorderColor.Value); } DDPrint.SetPrint(this.X, this.Y, this.YStep); DDPrint.PrintLine(title); DDPrint.PrintLine(string.Format("[{0}] 最小={1} 最大={2}", value, minval, maxval)); if (this.MouseUsable) { DDPrint.PrintLine("★ ホイール上・右=上げる"); DDPrint.PrintLine("★ ホイール下・左=下げる"); DDPrint.PrintLine("★ 上=速く上げる"); DDPrint.PrintLine("★ 下=速く下げる"); DDPrint.PrintLine("★ 調整が終わったら左クリック・決定ボタンを押して下さい。"); DDPrint.PrintLine("★ 右クリック・キャンセルボタンを押すと変更をキャンセルします。"); } else { DDPrint.PrintLine("★ 右=上げる"); DDPrint.PrintLine("★ 左=下げる"); DDPrint.PrintLine("★ 上=速く上げる"); DDPrint.PrintLine("★ 下=速く下げる"); DDPrint.PrintLine("★ 調整が終わったら決定ボタンを押して下さい。"); DDPrint.PrintLine("★ キャンセルボタンを押すと変更をキャンセルします。"); } DDPrint.Reset(); DDEngine.EachFrame(); } DDEngine.FreezeInput(); return(value); }
/// <summary> /// ショット実行 /// </summary> public void Shoot() { double pl_x; double pl_y; if (1 <= this.BornFrame) { pl_x = this.BornFollowX; pl_y = this.BornFollowY; if (DDUtils.IsOut(new D2Point(pl_x, pl_y), new D4Rect(0, 0, GameConsts.FIELD_W, GameConsts.FIELD_H))) // 画面外からは撃てない。 { return; } } else { pl_x = this.X; pl_y = this.Y; } switch (this.AbsorbedWeapon) { case -1: break; case 1: if (Game.I.Frame % 4 == 0) { double ZURE = 20; // 右上 Game.I.Shots.Add(new Shot_Strong( pl_x + ZURE, pl_y - ZURE, (Math.PI / 4.0) * 1 )); // 左上 Game.I.Shots.Add(new Shot_Strong( pl_x - ZURE, pl_y - ZURE, (Math.PI / 4.0) * 7 )); // 右 Game.I.Shots.Add(new Shot_Strong( pl_x + ZURE, pl_y, (Math.PI / 4.0) * 2 )); // 右 Game.I.Shots.Add(new Shot_Strong( pl_x + ZURE, pl_y + ZURE, (Math.PI / 4.0) * 2 )); // 左 Game.I.Shots.Add(new Shot_Strong( pl_x - ZURE, pl_y, (Math.PI / 4.0) * 6 )); // 左 Game.I.Shots.Add(new Shot_Strong( pl_x - ZURE, pl_y + ZURE, (Math.PI / 4.0) * 6 )); } break; case 2: if (Game.I.Frame % 2 == 0) { for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_WaveBehind( pl_x + 20.0 * c, pl_y - 5.0, 0.3 * c, 0.3 * c, 0.95 + SCommon.ToRange(this.SlowFrame * 0.0005, -0.02, 0.02) )); } } break; case 3: if (Game.I.Frame % 4 == 0) { for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Homing( pl_x, pl_y - 10.0 )); } } break; default: throw null; // never } switch (this.PlayerWho) { case PlayerWho_e.メディスン: { if (Game.I.Frame % 4 == 0) { Ground.I.SE.SE_PLAYERSHOT.Play(); Game.I.Shots.Add(new Shot_Laserメディスン(pl_x, pl_y - 10.0, this.Level)); } } break; case PlayerWho_e.小悪魔: { if (1 <= this.SlowFrame) // 低速移動 { if (Game.I.Frame % 4 == 0) { Ground.I.SE.SE_PLAYERSHOT.Play(); Game.I.Shots.Add(new Shot_Laser(pl_x, pl_y - 10.0, this.Level)); } } else // 高速移動 { if (Game.I.Frame % 3 == 0) { Ground.I.SE.SE_PLAYERSHOT.Play(); } switch (this.Level) // 前方ショット { case 0: case 1: { if (Game.I.Frame % 3 == 0) { Game.I.Shots.Add(new Shot_Normal( pl_x, pl_y - 5.0, 0.0 )); } } break; case 2: { if (Game.I.Frame % 3 == 0) { for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Normal( pl_x + 8.0 * c, pl_y - 5.0, 0.0 )); } } } break; case 3: { if (Game.I.Frame % 3 == 0) { Game.I.Shots.Add(new Shot_Strong( pl_x, pl_y - 5.0, 0.0 )); for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Normal( pl_x + 16.0 * c, pl_y - 5.0, 0.1 * c )); } } } break; case 4: { if (Game.I.Frame % 3 == 0) { for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Normal( pl_x + 8.0 * c, pl_y - 5.0, 0.0 )); } for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Normal( pl_x + 16.0 * c, pl_y - 5.0, 0.1 * c )); } } } break; case 5: { if (Game.I.Frame % 3 == 0) { Game.I.Shots.Add(new Shot_Strong( pl_x, pl_y - 5.0, 0.0 )); for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Strong( pl_x + 16.0 * c, pl_y - 5.0, 0.05 * c )); Game.I.Shots.Add(new Shot_Normal( pl_x + 24.0 * c, pl_y - 5.0, 0.1 * c )); } } } break; default: throw null; // never } switch (this.Level) // サイドショット { case 0: break; case 1: case 2: case 3: case 4: case 5: { if (Game.I.Frame % 4 == 0) { for (int c = -1; c <= 1; c += 2) { Game.I.Shots.Add(new Shot_Wave( pl_x + 20.0 * c, pl_y - 5.0, 0.3 * c, (-0.021 - 0.003 * this.YMoveRate) * c )); } } } break; default: throw null; // never } } } break; default: throw null; // never } }
public int IntVolumeConfig(string title, int value, int minval, int maxval, int valStep, int valFastStep, Action <int> valChanged, Action pulse) { const int PULSE_FRM = 60; int origval = value; DDCurtain.SetCurtain(); DDEngine.FreezeInput(); for (; ;) { bool chgval = false; if (DDInput.A.GetInput() == 1 || this.MouseUsable && DDMouse.L.GetInput() == -1) { break; } if (DDInput.B.GetInput() == 1 || this.MouseUsable && DDMouse.R.GetInput() == -1) { if (value == origval) { break; } value = origval; chgval = true; } if (this.MouseUsable) { value += DDMouse.Rot; chgval = true; } if (DDInput.DIR_8.IsPound()) { value += valFastStep; chgval = true; } if (DDInput.DIR_6.IsPound()) { value += valStep; chgval = true; } if (DDInput.DIR_4.IsPound()) { value -= valStep; chgval = true; } if (DDInput.DIR_2.IsPound()) { value -= valFastStep; chgval = true; } if (chgval) { value = SCommon.ToRange(value, minval, maxval); valChanged(value); } if (DDEngine.ProcFrame % PULSE_FRM == 0) { pulse(); } this.WallDrawer(); this.ResetPrint(); DDPrint.SetPrint(40, 40, 40); DDPrint.PrintLine(title); //DDPrint.PrintLine(string.Format("[{0}] 最小={1} 最大={2}", value, minval, maxval)); // old DDPrint.SetPrint(40, 170, 40); DDPrint.PrintLine(GetMeterString(value, minval, maxval, 67)); if (this.MouseUsable) { DDPrint.SetPrint(210, 320, 40); DDPrint.PrintLine("/// TIPS ///"); DDPrint.PrintLine("右・ホイール上・上 = 上げる"); DDPrint.PrintLine("左・ホイール下・下 = 下げる"); DDPrint.PrintLine("調整が終わったら左クリック・決定ボタンを押して下さい。"); DDPrint.PrintLine("右クリック・キャンセルボタンを押すと変更をキャンセルします。"); } else { DDPrint.SetPrint(345, 320, 40); DDPrint.PrintLine("/// TIPS ///"); DDPrint.PrintLine("右 または 上 = 上げる"); DDPrint.PrintLine("左 または 下 = 下げる"); DDPrint.PrintLine("調整が終わったら決定ボタンを押して下さい。"); DDPrint.PrintLine("キャンセルボタンを押すと変更をキャンセルします。"); } DDPrint.Reset(); DDEngine.EachFrame(); } DDEngine.FreezeInput(); return(value); }
private void SelectStage() { DDCurtain.SetCurtain(); DDEngine.FreezeInput(); // 値: // 0 == LAYER 9 // 1 == LAYER 8 // 2 == LAYER 7 // ... // 8 == LAYER 1 // 9 == 戻る // int selectIndex = Math.Min(Math.Max(0, Ground.I.ReachedStageIndex - 1), 8); for (; ;) { string[] items = Enumerable.Range(1, SCommon.ToRange(Ground.I.ReachedStageIndex, 1, 9)) .Select(stageIndex => "LAYER " + (10 - stageIndex)) .Concat(new string[] { "戻る" }) .ToArray(); { int Y_STEP = 40 + Math.Max(0, 7 - items.Length) * 5; int ITEMS_H = items.Length * Y_STEP + 24; int Y = (DDConsts.Screen_H - ITEMS_H) / 2; selectIndex = this.SimpleMenu.Perform("レイヤーセレクト", items, selectIndex, false, 380, Y, Y_STEP); } if (selectIndex == items.Length - 1) // ? 戻る { break; } // 値: // 0 == テストステージ -- 選択出来ない。 // 1 == LAYER 9 // 2 == LAYER 8 // 3 == LAYER 7 // ... // 9 == LAYER 1 // int selectedStageIndex = selectIndex + 1; if (selectedStageIndex <= Ground.I.ReachedStageIndex || DDConfig.LOG_ENABLED) { this.LeaveTitleMenu(); using (new GameProgressMaster()) { GameProgressMaster.I.StartStageIndex = selectedStageIndex; GameProgressMaster.I.Perform(); } this.ReturnTitleMenu(); break; // タイトルメニューへ戻っておく。 } } DDEngine.FreezeInput(); }
public void Test01() { DDPicture[][] motions = new DDPicture[][] { Ground.I.Picture2.Tewi_立ち, Ground.I.Picture2.Tewi_振り向き, Ground.I.Picture2.Tewi_しゃがみ, Ground.I.Picture2.Tewi_しゃがみ解除, Ground.I.Picture2.Tewi_しゃがみ振り向き, //Ground.I.Picture2.Tewi_ジャンプ_開始, Ground.I.Picture2.Tewi_ジャンプ_上昇, Ground.I.Picture2.Tewi_ジャンプ_下降, //Ground.I.Picture2.Tewi_ジャンプ_着地, //Ground.I.Picture2.Tewi_後ろジャンプ, Ground.I.Picture2.Tewi_歩く, Ground.I.Picture2.Tewi_走る, Ground.I.Picture2.Tewi_小ダメージ, Ground.I.Picture2.Tewi_大ダメージ, Ground.I.Picture2.Tewi_しゃがみ小ダメージ, Ground.I.Picture2.Tewi_しゃがみ大ダメージ, Ground.I.Picture2.Tewi_飛翔_開始, Ground.I.Picture2.Tewi_飛翔_前進, Ground.I.Picture2.Tewi_弱攻撃, Ground.I.Picture2.Tewi_中攻撃, Ground.I.Picture2.Tewi_強攻撃, Ground.I.Picture2.Tewi_しゃがみ弱攻撃, Ground.I.Picture2.Tewi_しゃがみ中攻撃, Ground.I.Picture2.Tewi_しゃがみ強攻撃, Ground.I.Picture2.Tewi_ジャンプ弱攻撃, Ground.I.Picture2.Tewi_ジャンプ中攻撃, Ground.I.Picture2.Tewi_ジャンプ強攻撃, //Ground.I.Picture2.Tewi_ジャンプ強攻撃_開始, //Ground.I.Picture2.Tewi_ジャンプ強攻撃_回転, //Ground.I.Picture2.Tewi_ジャンプ強攻撃_終了, Ground.I.Picture2.Cirno_立ち, Ground.I.Picture2.Cirno_しゃがみ, Ground.I.Picture2.Cirno_しゃがみ解除, //Ground.I.Picture2.Cirno_ジャンプ_開始, Ground.I.Picture2.Cirno_ジャンプ_上昇, Ground.I.Picture2.Cirno_ジャンプ_下降, //Ground.I.Picture2.Cirno_ジャンプ_着地, //Ground.I.Picture2.Cirno_後ろジャンプ, Ground.I.Picture2.Cirno_歩く, Ground.I.Picture2.Cirno_走る, Ground.I.Picture2.Cirno_ダメージ, Ground.I.Picture2.Cirno_しゃがみダメージ, Ground.I.Picture2.Cirno_飛翔, Ground.I.Picture2.Cirno_攻撃, Ground.I.Picture2.Cirno_しゃがみ攻撃, Ground.I.Picture2.Cirno_ジャンプ攻撃, }; DDEngine.FreezeInput(); int motionIndex = 0; int komaIndex = 0; for (int frame = 0; ; frame++) { if (DDInput.DIR_8.IsPound()) { motionIndex--; } if (DDInput.DIR_2.IsPound()) { motionIndex++; } if (DDInput.DIR_4.IsPound()) { komaIndex--; } if (DDInput.DIR_6.IsPound()) { komaIndex++; } motionIndex += motions.Length; motionIndex %= motions.Length; DDPicture[] motion = motions[motionIndex]; komaIndex = SCommon.ToRange(komaIndex, -1, motion.Length - 1); int koma = komaIndex; if (koma == -1) { koma = (frame / 5) % motion.Length; } DDCurtain.DrawCurtain(1.0); DDCurtain.DrawCurtain(-0.5); DDPrint.SetDebug(0, 16); DDPrint.Print(string.Join(", ", motionIndex, komaIndex, koma)); DDDraw.DrawCenter(motion[koma], DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawBegin(Ground.I.Picture.Dummy, DDConsts.Screen_W / 2, DDConsts.Screen_H / 2); DDDraw.DrawZoom(0.1); DDDraw.DrawEnd(); DDEngine.EachFrame(); } }
public static void ToRange(ref int value, int minval, int maxval) { value = SCommon.ToRange(value, minval, maxval); }
public static void ToRange(ref double value, double minval, double maxval) { value = SCommon.ToRange(value, minval, maxval); }
public void Draw() { if (PlayerLookLeftFrame == 0 && DDUtils.Random.Real() < 0.002) // キョロキョロするレート { PlayerLookLeftFrame = 150 + (int)(DDUtils.Random.Real() * 90.0); } DDUtils.CountDown(ref PlayerLookLeftFrame); double xZoom = this.FacingLeft ? -1 : 1; // 立ち > DDPicture picture = Ground.I.Picture.PlayerStands[120 < PlayerLookLeftFrame ? 1 : 0][(DDEngine.ProcFrame / 20) % 2]; if (1 <= this.MoveFrame) { if (this.MoveSlow) { picture = Ground.I.Picture.PlayerWalk[(DDEngine.ProcFrame / 10) % 2]; } else { picture = Ground.I.Picture.PlayerDash[(DDEngine.ProcFrame / 5) % 2]; } } if (1 <= this.AirborneFrame) { picture = Ground.I.Picture.PlayerJump[0]; } if (1 <= this.ShagamiFrame) { picture = Ground.I.Picture.PlayerShagami; } // < 立ち // 攻撃中 > if (1 <= this.AttackFrame) { picture = Ground.I.Picture.PlayerAttack; if (1 <= this.MoveFrame) { if (this.MoveSlow) { picture = Ground.I.Picture.PlayerAttackWalk[(DDEngine.ProcFrame / 10) % 2]; } else { picture = Ground.I.Picture.PlayerAttackDash[(DDEngine.ProcFrame / 5) % 2]; } } if (1 <= this.AirborneFrame) { picture = Ground.I.Picture.PlayerAttackJump; } if (1 <= this.ShagamiFrame) { picture = Ground.I.Picture.PlayerAttackShagami; } } // < 攻撃中 if (1 <= this.DeadFrame) { int koma = SCommon.ToRange(this.DeadFrame / 20, 0, 1); if (this.AirborneFrame == 0) { koma *= 2; } koma *= 2; koma++; picture = Ground.I.Picture.PlayerDamage[koma]; DDDraw.SetTaskList(DDGround.EL); } if (1 <= this.DamageFrame) { picture = Ground.I.Picture.PlayerDamage[0]; xZoom *= -1; } if (1 <= this.DamageFrame || 1 <= this.InvincibleFrame) { DDDraw.SetTaskList(DDGround.EL); DDDraw.SetAlpha(0.5); } DDDraw.DrawBegin( picture, SCommon.ToInt(this.X - DDGround.ICamera.X), SCommon.ToInt(this.Y - DDGround.ICamera.Y) - 16 ); DDDraw.DrawZoom_X(xZoom); DDDraw.DrawEnd(); DDDraw.Reset(); }