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)); } }
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)); } }
protected override IEnumerable <bool> E_Draw() { double r; switch (this.TamaKind) { case EnemyCommon.TAMA_KIND_e.NORMAL: r = 8.0; break; case EnemyCommon.TAMA_KIND_e.BIG: r = 12.0; break; case EnemyCommon.TAMA_KIND_e.LARGE: r = 30.0; break; // TODO: その他の敵弾についてもここへ追加.. default: throw null; // never } double xAdd; double yAdd; DDUtils.MakeXYSpeed(this.X, this.Y, Game.I.Player.X, Game.I.Player.Y, this.Speed, out xAdd, out yAdd); DDUtils.Rotate(ref xAdd, ref yAdd, this.Angle); DDPicture picture = EnemyCommon.GetTamaPicture(this.TamaKind, this.TamaColor); for (; ;) { this.X += xAdd; this.Y += yAdd; DDDraw.DrawCenter(picture, this.X, this.Y); if (this.AbsorbableWeapon != -1) // ? 吸収可能 { DDDraw.SetAlpha(0.5); DDDraw.SetBright(0.0, 0.5, 1.0); DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], this.X, this.Y); DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0); DDDraw.DrawZoom(0.5); DDDraw.DrawEnd(); DDDraw.Reset(); DDPrint.SetPrint((int)this.X, (int)this.Y); DDPrint.SetBorder(new I3Color(0, 0, 100)); DDPrint.Print("[" + this.AbsorbableWeapon + "]"); DDPrint.Reset(); } this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), r); yield return(!EnemyCommon.IsEvacuated(this)); } }