protected override IEnumerable <bool> E_Draw() { D2Point speed = DDUtils.AngleToPoint(this.Rad + this.RadZure, 3.0); for (int frame = 0; frame < 90; frame++) { speed *= 0.95; this.X += speed.X; this.Y += speed.Y; DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.NORMAL, this.Color), this.X, this.Y); DDDraw.DrawRotate(this.Rad + Math.PI / 2.0); DDDraw.DrawEnd(); this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0); yield return(true); } { double xa; double ya; DDUtils.MakeXYSpeed(this.X, this.Y, Game.I.Player.X, Game.I.Player.Y, 3.0, out xa, out ya); DDUtils.Rotate(ref xa, ref ya, this.RadZure); speed.X = xa; speed.Y = ya; } for (; ;) { this.X += speed.X; this.Y += speed.Y; DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.NORMAL, this.Color), this.X, this.Y); DDDraw.DrawRotate(this.Rad + Math.PI / 2.0); DDDraw.DrawEnd(); this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0); yield return(!EnemyCommon.IsEvacuated(this)); } }
protected override IEnumerable <bool> E_Draw() { D2Point speed = DDUtils.AngleToPoint(this.Rad, 3.0); for (; ;) { this.X += speed.X; this.Y += speed.Y; DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.KNIFE, this.Color), this.X, this.Y); DDDraw.DrawZoom(2.0); DDDraw.DrawRotate(this.Rad + Math.PI / 2.0); DDDraw.DrawEnd(); this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0); yield return(!EnemyCommon.IsEvacuated(this)); } }
protected override IEnumerable <bool> E_Draw() { for (int frame = 0; ; frame++) { if (DDUtils.IsOut(new D2Point(this.X, this.Y), new D4Rect(0, 0, GameConsts.FIELD_W, GameConsts.FIELD_H))) { break; } this.X += this.Speed.X; this.Y += this.Speed.Y; DDDraw.DrawBegin(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y); DDDraw.DrawEnd(); Game.I.EL_AfterDrawWalls.Add(SCommon.Supplier(this.E_魔法陣_1(this.X, this.Y))); this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0); yield return(true); } Game.I.EL_AfterDrawWalls.Add(SCommon.Supplier(this.E_魔法陣_V(this.X, this.Y))); { const double SPEED = 3.0; if (this.X < 0.0) // ? フィールド左側に衝突 { this.Speed = new D2Point(SPEED, 0.0); this.Color = EnemyCommon.TAMA_COLOR_e.YELLOW; } else if (GameConsts.FIELD_W < this.X) // ? フィールド右側に衝突 { this.Speed = new D2Point(-SPEED, 0.0); this.Color = EnemyCommon.TAMA_COLOR_e.YELLOW; } else if (this.Y < 0.0) // ? フィールド上側に衝突 { this.Speed = new D2Point(0.0, SPEED); this.Color = EnemyCommon.TAMA_COLOR_e.ORANGE; } else // ? フィールド下側に衝突 { this.Speed = new D2Point(0.0, -SPEED); this.Color = EnemyCommon.TAMA_COLOR_e.ORANGE; } } for (int frame = 0; ; frame++) { this.X += this.Speed.X; this.Y += this.Speed.Y; #if true // 他の敵弾より上に(後に)描画する。 // -- 見えやすいように // Game.I.EnemyEffects.Add(() => { DDDraw.DrawCenter(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y); return(false); }); #else // old DDDraw.DrawCenter(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y); #endif this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0); yield return(!EnemyCommon.IsEvacuated(this)); } }