コード例 #1
0
        protected override IEnumerable <bool> E_Draw()
        {
            double a_mahoujin = 0.0;

            for (int frame = 0; ; frame++)
            {
                {
                    double rad = frame / 70.0;

                    DDUtils.Approach(ref this.X, GameConsts.FIELD_W / 2 + Math.Sin(rad) * 180.0, 0.93);
                    DDUtils.Approach(ref this.Y, GameConsts.FIELD_H / 7 + Math.Cos(rad) * 50.0, 0.93);
                }

                if (30 < frame && frame % 3 == 0)
                {
                    for (int c = 0; c < 3; c++)
                    {
                        double  rad = frame / 27.0 + (Math.PI * 2.0) * c / 3.0;
                        D2Point pt  = DDUtils.AngleToPoint(rad, 50.0);

                        EnemyCommon.TAMA_COLOR_e color = new EnemyCommon.TAMA_COLOR_e[]
                        {
                            EnemyCommon.TAMA_COLOR_e.CYAN,
                            EnemyCommon.TAMA_COLOR_e.YELLOW,
                            EnemyCommon.TAMA_COLOR_e.PURPLE,
                        }
                        [c];

                        Game.I.Enemies.Add(new Enemy_鍵山雛_Tama_01(this.X + pt.X, this.Y + pt.Y, rad + Math.PI / 2.0, color));
                        Game.I.Enemies.Add(new Enemy_鍵山雛_Tama_01(this.X + pt.X, this.Y + pt.Y, rad - Math.PI / 2.0, color));
                    }
                }

                {
                    const int TRANS_FRAME = 60;

                    if (frame == TRANS_FRAME)
                    {
                        // ボム消し
                        // このフレームにおけるボム当たり判定は既に展開しているので、ボスの当たり判定を展開する前のフレームで消す。
                        Game.I.Shots.RemoveAll(v => v.Kind == Shot.Kind_e.BOMB);

                        // 念のためリセット
                        //Game.I.BombUsed = false;
                        Game.I.PlayerWasDead = false;
                    }
                    else if (TRANS_FRAME < frame)
                    {
                        DDUtils.Approach(ref a_mahoujin, 1.0, 0.99);
                        this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 25.0);
                    }
                }

                EnemyCommon_鍵山雛.Draw(this.X, this.Y, true, a_mahoujin);
                EnemyCommon_鍵山雛.DrawOther(this);

                yield return(true);
            }
        }
コード例 #2
0
        protected override IEnumerable <bool> E_Draw()
        {
            double a_mahoujin = 0.0;

            for (int frame = 0; ; frame++)
            {
                DDUtils.Approach(ref this.X, GameConsts.FIELD_W / 2 + Math.Sin(frame / 101.0) * 20.0, 0.993);
                DDUtils.Approach(ref this.Y, GameConsts.FIELD_H / 2 + Math.Sin(frame / 103.0) * 20.0, 0.993);

                if (30 < frame && frame % 3 == 0)
                {
                    for (int c = 0; c < 2; c++)
                    {
                        double  rad = frame / 27.0 + (Math.PI * 2.0) * c / 2.0;
                        D2Point pt  = DDUtils.AngleToPoint(rad, 20.0);

                        Game.I.Enemies.Add(new Enemy_鍵山雛_Tama_02(this.X + pt.X, this.Y + pt.Y, rad, 0.9, EnemyCommon.TAMA_COLOR_e.RED));
                        Game.I.Enemies.Add(new Enemy_鍵山雛_Tama_02(this.X + pt.X, this.Y + pt.Y, rad, 0.0, EnemyCommon.TAMA_COLOR_e.GREEN));
                        Game.I.Enemies.Add(new Enemy_鍵山雛_Tama_02(this.X + pt.X, this.Y + pt.Y, rad, -0.9, EnemyCommon.TAMA_COLOR_e.BLUE));
                    }
                }

                if (30 < frame && frame % 20 == 0)
                {
                    for (int c = 0; c < 3; c++)
                    {
                        double  rad = DDUtils.GetAngle(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y) + (Math.PI * 2.0) * (c * 2 + 1) / 6.0;
                        D2Point pt  = DDUtils.AngleToPoint(rad, 50.0);

                        Game.I.Enemies.Add(new Enemy_鍵山雛_Tama_03(this.X, this.Y, rad, EnemyCommon.TAMA_COLOR_e.PINK));
                    }
                }

                {
                    const int TRANS_FRAME = 60;

                    if (frame == TRANS_FRAME)
                    {
                        // ボム消し
                        // このフレームにおけるボム当たり判定は既に展開しているので、ボスの当たり判定を展開する前のフレームで消す。
                        Game.I.Shots.RemoveAll(v => v.Kind == Shot.Kind_e.BOMB);

                        // 念のためリセット
                        //Game.I.BombUsed = false;
                        Game.I.PlayerWasDead = false;
                    }
                    else if (TRANS_FRAME < frame)
                    {
                        DDUtils.Approach(ref a_mahoujin, 1.0, 0.99);
                        this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 25.0);
                    }
                }

                EnemyCommon_鍵山雛.Draw(this.X, this.Y, true, a_mahoujin);
                EnemyCommon_鍵山雛.DrawOther(this);

                yield return(true);
            }
        }
コード例 #3
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; !this.NextFlag; frame++)
            {
                DDUtils.Approach(ref this.X, GameConsts.FIELD_W / 2 + Math.Sin(DDEngine.ProcFrame / 57.0) * 3.0, 0.97);
                DDUtils.Approach(ref this.Y, GameConsts.FIELD_H / 7 + Math.Sin(DDEngine.ProcFrame / 53.0) * 5.0, 0.91);

                EnemyCommon_鍵山雛.Draw(this.X, this.Y, frame < 60);

                // 掛け合い用なので、当たり判定無し

                yield return(true);
            }

            Game.I.Enemies.Add(new Enemy_鍵山雛_01(this.X, this.Y));
        }