예제 #1
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                double ax = 0.0;
                double ay = -20.0;

                DDUtils.Rotate(ref ax, ref ay, this.R);

                this.X += ax;
                this.Y += ay;

                if (DDUtils.IsOut(new D2Point(this.X, this.Y), new D4Rect(0, 0, GameConsts.FIELD_W, GameConsts.FIELD_H)))
                {
                    break;
                }

                DDDraw.SetAlpha(ShotConsts.A);
                DDDraw.DrawBegin(Ground.I.Picture2.D_SHOT, this.X, this.Y);
                DDDraw.DrawRotate(this.R);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                this.Crash = DDCrashUtils.Circle(
                    new D2Point(this.X, this.Y),
                    12.0
                    );

                yield return(true);
            }
        }
예제 #2
0
        private void DrawYukari(double x, double y, double zoom)
        {
#if true
            DDDraw.DrawBegin(Ground.I.Picture.未確認飛行ゆかりん_からだ, x, y);
            DDDraw.DrawRotate(Math.Sin(DDEngine.ProcFrame / 17.0 - 1.3) * 0.03);
            DDDraw.DrawZoom(zoom);
            DDDraw.DrawEnd();

            DDDraw.DrawBegin(Ground.I.Picture.未確認飛行ゆかりん_あたま0000, x, y);
            DDDraw.DrawRotate(Math.Sin(DDEngine.ProcFrame / 17.0 - 0.4) * 0.03);
            DDDraw.DrawZoom(zoom);
            DDDraw.DrawEnd();

            DDDraw.DrawBegin(Ground.I.Picture.未確認飛行ゆかりん_UFO, x, y);
            DDDraw.DrawRotate(Math.Sin(DDEngine.ProcFrame / 17.0 - 0.0) * 0.03);
            DDDraw.DrawZoom(zoom);
            DDDraw.DrawEnd();
#else // old
            Action <DDPicture> draw = picture =>
            {
                DDDraw.DrawBegin(picture, x, y);
                DDDraw.DrawZoom(zoom);
                DDDraw.DrawEnd();
            };

            draw(Ground.I.Picture.未確認飛行ゆかりん_からだ);
            draw(Ground.I.Picture.未確認飛行ゆかりん_あたま0000);
            draw(Ground.I.Picture.未確認飛行ゆかりん_UFO);
#endif
        }
예제 #3
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0)
                {
                    this.プレイヤーがアイテムを取得した();
                    break;
                }

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0);
                    DDDraw.DrawEnd();

                    DDPrint.SetDebug((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y);
                    DDPrint.SetBorder(new I3Color(0, 0, 0));
                    DDPrint.PrintLine("アイテム");
                    DDPrint.PrintLine("効用:" + 効用_e_Names[(int)this.効用]);
                    DDPrint.Reset();

                    // 当たり判定無し
                }
                yield return(true);
            }
        }
예제 #4
0
        private IEnumerable <bool> Circle(double target_a, double target_z, double z, double r_add)
        {
            double a = 0.0;
            double r = 0.0;

            for (int frame = 0; ; frame++)
            {
                if (frame == GameConsts.PLAYER_BOMB_FRAME_MAX)
                {
                    target_a = 0.0;
                }

                DDUtils.Approach(ref a, target_a, 0.9);
                DDUtils.Approach(ref z, target_z, 0.9);
                r += r_add;

                DDDraw.SetAlpha(a);
                DDDraw.DrawBegin(Ground.I.Picture2.D_DECOCIRCLE, this.X, this.Y);
                DDDraw.DrawZoom(z);
                DDDraw.DrawRotate(r);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                yield return(true);
            }
        }
예제 #5
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0)
                {
                    GameCommon.SaveGame();
                    break;
                }

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
                    DDDraw.DrawEnd();

                    DDPrint.SetPrint((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y);
                    DDPrint.SetBorder(new I3Color(0, 0, 0));
                    DDPrint.PrintLine("セーブ地点");
                    DDPrint.Reset();

                    // 当たり判定無し
                }
                yield return(true);
            }
        }
예제 #6
0
            private IEnumerable <bool> Effect_0001(double dx, double dy, double dxa, double dya)
            {
                double x  = DDConsts.Screen_W / 2;
                double y  = DDConsts.Screen_H / 2;
                double a  = 1.0;
                double z  = 1.3;
                double r  = 0.0;
                double xa = DDUtils.Random.Real() * 0.01;
                double ya = DDUtils.Random.Real() * 0.01;
                double aa = -0.007 - DDUtils.Random.Real() * 0.003;
                double za = DDUtils.Random.Real() * 0.00006 - 0.00002;
                double ra = DDUtils.Random.Real() < 0.3 ? DDUtils.Random.Real() * 0.003 - 0.0015 : 0.0;

                while (0.003 < a)
                {
                    DDDraw.SetAlpha(a);
                    DDDraw.DrawBegin(Ground.I.Picture.TitleWall, x, y);
                    DDDraw.DrawZoom(z);
                    DDDraw.DrawSlide(dx, dy);
                    DDDraw.DrawRotate(r);
                    DDDraw.DrawEnd();
                    DDDraw.Reset();

                    x += xa + dxa;
                    y += ya + dya;
                    a += aa;
                    z += za;
                    r += ra;

                    dxa *= 0.99;
                    dya *= 0.99;

                    yield return(true);
                }
            }
예제 #7
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                double ax = 0.0;
                double ay = -15.0;

                DDUtils.Rotate(ref ax, ref ay, this.R);

                this.X += ax;
                this.Y += ay;

                //if (DDUtils.IsOut(new D2Point(this.X, this.Y), new D4Rect(0, 0, GameConsts.FIELD_W, GameConsts.FIELD_H)))
                //    break;

                this.R += this.RAdd;
                DDUtils.Approach(ref this.RAdd, 0.0, this.RAddRatePerFrame);

                DDDraw.SetAlpha(ShotConsts.A * 2.0);
                DDDraw.SetBright(1.0, 0.3, 0.3);
                DDDraw.DrawBegin(Ground.I.Picture2.D_WAVESHOT, this.X, this.Y);
                DDDraw.DrawRotate(this.R);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                this.Crash = DDCrashUtils.Circle(
                    new D2Point(this.X, this.Y),
                    24.0
                    );

                yield return(true);
            }
        }
예제 #8
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 30.0)                 // ? 十分に接近 -> 取得する。
                {
                    Game.I.Status.InventoryFlags[GameStatus.Inventory_e.取得済み_跳ねる陰陽玉] = true;
                    break;
                }

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
                    DDDraw.DrawEnd();

                    DDPrint.SetDebug((int)this.X - DDGround.ICamera.X, (int)this.Y - DDGround.ICamera.Y);
                    DDPrint.SetBorder(new I3Color(0, 0, 0));
                    DDPrint.PrintLine("跳ねる陰陽玉");
                    DDPrint.Reset();

                    // 当たり判定無し
                }
                yield return(true);
            }
        }
예제 #9
0
        protected override IEnumerable <bool> E_Draw()
        {
            double xSpeed = 1.0;

            for (; ;)
            {
                xSpeed -= 0.1;
                this.X += xSpeed;

                if (DDUtils.GetDistance(new D2Point(Game.I.Player.X, Game.I.Player.Y), new D2Point(this.X, this.Y)) < 60.0)
                {
                    this.プレイヤーがアイテムを取得した();
                    break;
                }

                DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X, this.Y);
                DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0);
                DDDraw.DrawEnd();

                DDPrint.SetPrint((int)this.X, (int)this.Y);
                DDPrint.SetBorder(new I3Color(0, 0, 0));
                DDPrint.PrintLine("アイテム");
                DDPrint.PrintLine("効用:" + 効用_e_Names[(int)this.効用]);
                DDPrint.Reset();

                // 当たり判定無し

                yield return(true);
            }
        }
예제 #10
0
 public override void Draw()
 {
     DDDraw.SetAlpha(this.A);
     DDDraw.DrawBegin(DDGround.GeneralResource.Dummy, this.X, this.Y);
     DDDraw.DrawRotate(DDEngine.ProcFrame / 100.0);
     DDDraw.DrawEnd();
     DDDraw.Reset();
 }
예제 #11
0
        private IEnumerable <bool> E_魔法陣_1(double x, double y)
        {
            DDDraw.SetAlpha(0.2);
            DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], x, y);
            DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
            DDDraw.DrawZoom(0.5);
            DDDraw.DrawEnd();
            DDDraw.Reset();

            yield return(false);            // once
        }
예제 #12
0
        private static void BigFairyDraw(FairyInfo fairy, int color)
        {
            if (fairy.Frame == 0)             // init
            {
                fairy.LastX = fairy.Enemy.X;
            }
            double xDiff = fairy.Enemy.X - fairy.LastX;

            fairy.LastX = fairy.Enemy.X;

            if (fairy.Frame % 7 == 0)
            {
                if (Math.Abs(xDiff) < SCommon.MICRO)                 // ? 左右に動いてない。
                {
                    DDUtils.CountDown(ref fairy.XMoveCount);
                }
                else if (xDiff < 0.0)                 // ? 左に動いてる。
                {
                    fairy.XMoveCount--;
                }
                else                 // ? 右に動いてる。
                {
                    fairy.XMoveCount++;
                }
                DDUtils.ToRange(ref fairy.XMoveCount, -2, 2);
            }
            int mode = DDUtils.Sign(fairy.XMoveCount);
            int koma;

            if (mode != 0)
            {
                koma = Math.Abs(fairy.XMoveCount) - 1;
            }
            else
            {
                koma = (fairy.Frame / 7) % 3;
            }

            if (1 <= fairy.Enemy.HP && fairy.Enemy.TransFrame == 0)             // ? 無敵ではない。
            {
                DDUtils.Approach(ref fairy.UntransRate, 0.5, 0.92);
            }

            DDDraw.SetAlpha(fairy.UntransRate);
            DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], fairy.Enemy.X, fairy.Enemy.Y);
            DDDraw.DrawRotate(fairy.Frame / 20.0);
            DDDraw.DrawZoom(0.4);
            DDDraw.DrawEnd();
            DDDraw.Reset();

            DDDraw.DrawCenter(GetBigFairyPicture(color, mode, koma), fairy.Enemy.X, fairy.Enemy.Y);

            fairy.Enemy.Crash = DDCrashUtils.Circle(new D2Point(fairy.Enemy.X, fairy.Enemy.Y), 30.0);
        }
예제 #13
0
        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));
            }
        }
예제 #14
0
        private IEnumerable <bool> E_魔法陣_V(double x, double y)
        {
            foreach (DDScene scene in DDSceneUtils.Create(30))
            {
                DDDraw.SetAlpha(0.2 - scene.Rate * 0.2);
                DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], x, y);
                DDDraw.DrawRotate(DDEngine.ProcFrame / 30.0);
                DDDraw.DrawZoom(0.5 + scene.Rate * 1.0);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                yield return(true);
            }
        }
예제 #15
0
        public static IEnumerable <bool> PlayerDead(double x, double y)
        {
            foreach (DDScene scene in DDSceneUtils.Create(GameConsts.PLAYER_DEAD_FRAME_MAX))
            {
                DDDraw.SetAlpha(0.5);
                DDDraw.DrawBegin(Ground.I.Picture.Player, x, y);
                DDDraw.DrawRotate(scene.Rate * 5.0);
                DDDraw.DrawZoom(1.0 + scene.Rate * 5.0);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                yield return(true);
            }
        }
예제 #16
0
        private static IEnumerable <bool> E_残像()
        {
            foreach (DDScene scene in DDSceneUtils.Create(30))
            {
                DDDraw.SetAlpha((1.0 - scene.Rate) * 0.8);
                //DDDraw.DrawSimple(EL_Screen.ToPicture(), 0, 0);
                DDDraw.DrawBegin(EL_Screen.ToPicture(), DDConsts.Screen_W / 2, DDConsts.Screen_H / 2);
                DDDraw.DrawZoom(1.0 + scene.Rate * 0.1);
                DDDraw.DrawRotate(scene.Rate * 0.03);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                yield return(true);
            }
        }
예제 #17
0
        public static IEnumerable <bool> EnemyDead(double x, double y)
        {
            double r = DDUtils.Random.Real() * Math.PI * 2.0;

            foreach (DDScene scene in DDSceneUtils.Create(19))
            {
                DDDraw.SetAlpha(0.7);
                DDDraw.DrawBegin(Ground.I.Picture2.D_ENEMYDIE_00_BGRA[scene.Numer / 2], x, y);
                DDDraw.DrawRotate(r);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                yield return(true);
            }
        }
예제 #18
0
        public static IEnumerable <bool> 閉鎖_開放(double x, double y)
        {
            foreach (DDScene scene in DDSceneUtils.Create(15))
            {
                DDDraw.SetAlpha(0.5);
                DDDraw.SetBright(0.0, 1.0, 1.0);
                DDDraw.DrawBegin(Ground.I.Picture.WhiteBox, x - DDGround.ICamera.X, y - DDGround.ICamera.Y);
                DDDraw.DrawSetSize(GameConsts.TILE_W, GameConsts.TILE_H);
                DDDraw.DrawZoom(1.0 - scene.Rate * 0.5);
                DDDraw.DrawRotate(Math.PI * 2.0 * scene.Rate);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                yield return(true);
            }
        }
예제 #19
0
            private IEnumerable <bool> E_DrawPiace(DrawPosInfo drawPos_1, DrawPosInfo drawPos_2, int frameMax)
            {
                foreach (DDScene scene in DDSceneUtils.Create(frameMax))
                {
                    double scRate = DDUtils.SCurve(scene.Rate);
                    double x      = GameConsts.FIELD_L + DDUtils.AToBRate(drawPos_1.X, drawPos_2.X, scRate);
                    double y      = GameConsts.FIELD_T + DDUtils.AToBRate(drawPos_1.Y, drawPos_2.Y, scRate);
                    double rot    = DDUtils.AToBRate(drawPos_1.Rot, drawPos_2.Rot, scRate);

                    DDDraw.DrawBegin(this.Picture, x, y);
                    DDDraw.DrawRotate(rot);
                    DDDraw.DrawEnd();

                    yield return(true);
                }
            }
예제 #20
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (int frame = 0; ; frame++)
            {
                this.X += this.Speed.X;
                this.Y += this.Speed.Y;

                if (this.X < 0.0)
                {
                    this.Speed.X = Math.Abs(this.Speed.X);
                }
                else if (GameConsts.FIELD_W < this.X)
                {
                    this.Speed.X = -Math.Abs(this.Speed.X);
                }

                if (this.Y < 0.0)
                {
                    this.Speed.Y = Math.Abs(this.Speed.Y);
                }
                else
                {
                    this.Speed.Y += 0.03;                     // 重力加速度
                }
                if (this.AbsorbableWeapon != -1)              // ? 吸収可能
                {
                    DDDraw.SetAlpha(0.2);
                    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(1.2);
                    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();
                }

                DDDraw.DrawCenter(EnemyCommon.GetTamaPicture(EnemyCommon.TAMA_KIND_e.DOUBLE, this.Color), this.X, this.Y);

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 6.0);

                yield return(this.Y < GameConsts.FIELD_H);
            }
        }
예제 #21
0
        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));
            }
        }
예제 #22
0
                private IEnumerable <bool> E_Move(double sx, double sy, double dx, double dy, double sRot, double dRot)
                {
                    foreach (DDScene scene in DDSceneUtils.Create(DDUtils.Random.GetRange(20, 60)))
                    {
                        DDDraw.SetBright(_color);
                        DDDraw.DrawBegin(
                            Ground.I.Picture.WhiteBox,
                            DDUtils.AToBRate(sx, dx, DDUtils.SCurve(scene.Rate)),
                            DDUtils.AToBRate(sy, dy, DDUtils.SCurve(scene.Rate))
                            );
                        DDDraw.DrawSetSize(TILE_W, TILE_H);
                        DDDraw.DrawRotate(DDUtils.AToBRate(sRot, dRot, DDUtils.SCurve(scene.Rate)));
                        DDDraw.DrawEnd();
                        DDDraw.Reset();

                        yield return(true);
                    }
                }
예제 #23
0
        protected override IEnumerable <bool> E_Draw()
        {
            D2Point speed = GameCommon.GetXYSpeed(this.Direction, 10.0);

            for (int frame = 0; ; frame++)
            {
                this.X += speed.X;
                this.Y += speed.Y;

                DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                DDDraw.DrawRotate(frame / 2.0);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 10.0);

                yield return(!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y)));                // カメラの外に出たら(画面から見えなくなったら)消滅する。
            }
        }
예제 #24
0
        protected override IEnumerable <bool> E_Draw()
        {
            D2Point speed        = GameCommon.GetXYSpeed(this.Direction, 8.0);
            int     bouncedCount = 0;

            for (int frame = 0; ; frame++)
            {
                this.X += speed.X;
                this.Y += speed.Y;

                if (this.壁をすり抜ける)                 // ? 跳ね返り可能
                {
                    bool bounced = false;

                    if (this.IsInsideWall(-10, 0) || this.IsInsideWall(10, 0))
                    {
                        speed.X *= -1.0;
                        bounced  = true;
                    }
                    if (this.IsInsideWall(0, -10) || this.IsInsideWall(0, 10))
                    {
                        speed.Y *= -1.0;
                        bounced  = true;
                    }
                    if (bounced)
                    {
                        DDGround.EL.Add(SCommon.Supplier(Effects.跳ねた(this.X, this.Y)));
                        bouncedCount++;

                        if (BOUNCE_MAX <= bouncedCount)
                        {
                            this.壁をすり抜ける = false;
                        }
                    }
                }
                DDDraw.DrawBegin(Ground.I.Picture2.IconSet[0, 35], this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                DDDraw.DrawRotate(frame / 2.0);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 10.0);

                yield return(!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y)));                // カメラの外に出たら(画面から見えなくなったら)消滅する。
            }
        }
예제 #25
0
        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));
            }
        }
예제 #26
0
        public static void Draw(double x, double y, bool spinning, double a_mahoujin = 0.0)
        {
            DDDraw.SetTaskList(Game.I.EL_AfterDrawWalls);
            DDDraw.SetAlpha(0.3 * a_mahoujin);
            DDDraw.DrawBegin(Ground.I.Picture2.D_MAHOJIN_HAJIKE_00[5], x, y);
            DDDraw.DrawZoom(3.0);
            DDDraw.DrawRotate(DDEngine.ProcFrame / 60.0);
            DDDraw.DrawEnd();
            DDDraw.Reset();

            if (spinning)
            {
                DDDraw.DrawCenter(Ground.I.Picture2.D_HINA_00[(DDEngine.ProcFrame / 5) % 3], x, y);
            }
            else
            {
                DDDraw.DrawCenter(Ground.I.Picture2.D_HINA, x, y);
            }
        }
예제 #27
0
        public void Draw()
        {
            if (this.DeadScene.IsFlaming())
            {
                DDScene scene = this.DeadScene.GetScene();

                DDDraw.SetAlpha(0.5);
                DDDraw.DrawBegin(Ground.I.Picture.Player, this.X, this.Y);
                DDDraw.DrawRotate(scene.Rate * 5.0);
                DDDraw.DrawZoom(1.0 + scene.Rate * 5.0);
                DDDraw.DrawEnd();
                DDDraw.Reset();

                return;
            }
            if (this.BornScene.IsFlaming())
            {
                if (this.BornScene.IsJustFired())
                {
                    this.Born_X = -50.0;
                    this.Born_Y = DDConsts.Screen_H / 2.0;
                }
                DDScene scene = this.BornScene.GetScene();

                DDUtils.Approach(ref this.Born_X, this.X, 0.9 - 0.3 * scene.Rate);
                DDUtils.Approach(ref this.Born_Y, this.Y, 0.9 - 0.3 * scene.Rate);

                DDDraw.SetAlpha(0.5);
                DDDraw.DrawCenter(Ground.I.Picture.Player, this.Born_X, this.Born_Y);
                DDDraw.Reset();

                return;
            }
            if (this.MutekiScene.IsFlaming())
            {
                DDDraw.SetAlpha(0.5);
                DDDraw.DrawCenter(Ground.I.Picture.Player, this.X, this.Y);
                DDDraw.Reset();

                return;
            }
            DDDraw.DrawCenter(Ground.I.Picture.Player, this.X, this.Y);
        }
예제 #28
0
        protected override IEnumerable <bool> E_Draw()
        {
            for (; ;)
            {
                double rot = DDUtils.GetAngle(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y);
                rot += DDUtils.Random.Real() * 0.05;
                D2Point speedAdd = DDUtils.AngleToPoint(rot, 0.1);
                double  distance = DDUtils.GetDistance(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y);

                if (distance < 50.0)
                {
                    speedAdd *= -300.0;
                }
                this.Speed += speedAdd;
                this.Speed *= 0.93;

                this.X += this.Speed.X;
                this.Y += this.Speed.Y;

                if (!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y), 50.0))
                {
                    DDDraw.DrawBegin(Ground.I.Picture.Dummy, this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                    DDDraw.DrawRotate(DDEngine.ProcFrame / 10.0);
                    DDDraw.DrawEnd();

                    DDPrint.SetBorder(new I3Color(64, 64, 0));
                    DDPrint.SetPrint(
                        (int)this.X - DDGround.ICamera.X - 10,
                        (int)this.Y - DDGround.ICamera.Y - 10,
                        20
                        );
                    DDPrint.PrintLine("敵(仮)");
                    DDPrint.PrintLine("[無害]");
                    DDPrint.PrintLine("DIST=" + distance.ToString("F3"));
                    DDPrint.Reset();

                    // 当たり判定ナシ
                }
                yield return(true);
            }
        }
예제 #29
0
        protected override IEnumerable <bool> E_Draw()
        {
            double ctrx = this.X;
            double ctry = this.Y;

            D2Point speed = GameCommon.GetXYSpeed(this.Direction, 5.5);

            for (int frame = 0; ; frame++)
            {
                ctrx += speed.X;
                ctry += speed.Y;

                double xadd = speed.Y * 20.0;
                double yadd = speed.X * 20.0;

                if (this.左回転)
                {
                    xadd *= -1.0;
                }
                else
                {
                    yadd *= -1.0;
                }

                double rate = Math.Sin(frame / 20.0);

                xadd *= rate;
                yadd *= rate;

                this.X = ctrx + xadd;
                this.Y = ctry + yadd;

                DDDraw.DrawBegin(Ground.I.Picture2.IconSet[2, 35], this.X - DDGround.ICamera.X, this.Y - DDGround.ICamera.Y);
                DDDraw.DrawRotate(frame / 2.0);
                DDDraw.DrawEnd();

                this.Crash = DDCrashUtils.Circle(new D2Point(this.X, this.Y), 10.0);

                yield return(!DDUtils.IsOutOfCamera(new D2Point(this.X, this.Y)));                // カメラの外に出たら(画面から見えなくなったら)消滅する。
            }
        }
예제 #30
0
파일: Program.cs 프로젝트: stackprobe/Fairy
        private void Test01()
        {
            for (; ;)
            {
                if (DDInput.A.GetInput() == 1)
                {
                    break;
                }

                DDCurtain.DrawCurtain();

                DDPrint.SetPrint();
                DDPrint.Print("FrameProcessingMillis: " + DDEngine.FrameProcessingMillis);

                DDDraw.DrawBegin(DDGround.GeneralResource.WhiteBox, DDConsts.Screen_W / 2.0, DDConsts.Screen_H / 2.0);
                DDDraw.DrawZoom(10.0);
                DDDraw.DrawRotate(DDEngine.ProcFrame / 20.0);
                DDDraw.DrawEnd();

                DDEngine.EachFrame();
            }
        }