Exemple #1
0
        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));
            }
        }
Exemple #2
0
        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));
            }
        }
Exemple #3
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                const double AR = 0.99;
                const double ER = 1.01;

                if (frame < this.EvacuateFrame)
                {
                    DDUtils.Approach(ref this.X, this.TargetX, AR);
                    DDUtils.Approach(ref this.Y, this.TargetY, AR);
                }
                else
                {
                    this.X += this.EvacuateXAdd;
                    this.Y += this.EvacuateYAdd;

                    this.EvacuateXAdd *= ER;
                    this.EvacuateXAdd *= ER;
                }

                EnemyCommon.Shoot(this, this.ShotType);

                yield return(EnemyCommon.FairyDraw(this.Fairy));
            }
        }
Exemple #4
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                this.TargetX += this.XAdd;
                this.TargetY += this.YAdd;

                DDUtils.Approach(ref this.X, this.TargetX, this.ApproachingRate);
                DDUtils.Approach(ref this.Y, this.TargetY, this.ApproachingRate);

                EnemyCommon.Shoot(this, this.ShotType);

                yield return(EnemyCommon.FairyDraw(this.Fairy));
            }
        }
Exemple #5
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                double xa;
                double ya;

                DDUtils.MakeXYSpeed(this.X, this.Y, Game.I.Player.X, Game.I.Player.Y, this.Speed, out xa, out ya);

                this.X += xa;
                this.Y += ya;

                EnemyCommon.Shoot(this, this.ShotType);

                yield return(EnemyCommon.FairyDraw(this.Fairy));
            }
        }
Exemple #6
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (this.TargetY < this.MaxY)
                {
                    this.TargetY += this.Speed;
                }
                else
                {
                    this.TargetX += this.Speed * this.XDir;
                }

                DDUtils.Approach(ref this.X, this.TargetX, this.ApproachingRate);
                DDUtils.Approach(ref this.Y, this.TargetY, this.ApproachingRate);

                EnemyCommon.Shoot(this, this.ShotType);

                yield return(EnemyCommon.FairyDraw(this.Fairy));
            }
        }