Example #1
0
        protected override IEnumerable <bool> E_Draw()
        {
            // ---- 環境制御 ----

            Game.I.Walls.Add(new Wall_22001());

            // ----

            Func <bool> f_updateTarget = SCommon.Supplier(this.E_UpdateTarget());
            Func <bool> f_attack       = SCommon.Supplier(this.E_Attack());

            for (int frame = 0; ; frame++)
            {
                f_updateTarget();

                double apprRate = 1.0 - Math.Min(1.0, frame / 60.0) * 0.05;

                DDUtils.Approach(ref this.X, this.Target_X, apprRate);
                DDUtils.Approach(ref this.Y, this.Target_Y, apprRate);

                if (EnemyConsts_ルーミア.TRANS_FRAME < frame)
                {
                    f_attack();
                }

                EnemyCommon_ルーミア.PutCrash(this, frame);
                EnemyCommon_ルーミア.Draw(this.X, this.Y);

                yield return(true);
            }
        }
Example #2
0
        protected override IEnumerable <bool> E_Draw()
        {
            // ---- 環境制御 ----

            Game.I.Walls.Add(new Wall_21001());
            Game.I.Walls.Add(new Wall_21002());

            // ----

            Func <bool> f_attack_01 = SCommon.Supplier(this.E_Attack_01());
            Func <bool> f_attack_02 = SCommon.Supplier(this.E_Attack_02());

            const int 画面分割_開始Frame = EnemyConsts_ルーミア.TRANS_FRAME + 180;

            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 (EnemyConsts_ルーミア.TRANS_FRAME < frame)
                {
                    if (!this.Mode_02)
                    {
                        if (frame < 画面分割_開始Frame)
                        {
                            double sec  = (画面分割_開始Frame - frame) / 60.0;
                            string sSec = sec.ToString("F2");

                            DDGround.EL.Add(() =>
                            {
                                DDPrint.SetPrint(
                                    GameConsts.FIELD_L + GameConsts.FIELD_W / 2 - 16,
                                    GameConsts.FIELD_T + GameConsts.FIELD_H / 2 - 8
                                    );
                                DDPrint.SetBorder(new I3Color(192, 0, 0));
                                DDPrint.SetColor(new I3Color(255, 255, 0));
                                DDPrint.Print(sSec);
                                DDPrint.Reset();

                                return(false);
                            });
                        }
                        else if (frame == 画面分割_開始Frame)
                        {
                            画面分割_Effect.Enter();
                            画面分割.Enabled = true;
                        }
                    }

                    f_attack_01();
                    f_attack_02();
                }

                EnemyCommon_ルーミア.PutCrash(this, frame);
                EnemyCommon_ルーミア.Draw(this.X, this.Y);

                yield return(true);
            }
        }
Example #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);

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

                yield return(true);
            }

            Game.I.BossBattleStarted = true;
            Game.I.Enemies.Add(new Enemy_ルーミア_01(this.X, this.Y));
        }