コード例 #1
1
        protected override void Update(int t)
        {
            P = _p0 + t * _v;
            if (t < _delay)
            {
                return;
            }

            _random = _.Random.Angle();

            _.World.Spawn(new Blast(P, 10, 120));

            foreach (var v in Danmaku.Ring(new XY(_random), _.Difficulty.Choose(5, 7, 5, 7)))
            {
                _.World.Spawn(
                    new DelayedLinearPetalBullet(
                        new XY(P.X, P.Y),
                        v * 0.75f,
                        Color.DarkRed,
                        Color.Red,
                        3f,
                        120,
                        21
                        )
                    );
            }
            foreach (var v in Danmaku.Ring(new XY(_random + Mathf.PI / _.Difficulty.Choose(0, 0, 5, 7)), _.Difficulty.Choose(0, 0, 5, 7)))
            {
                _.World.Spawn(
                    new DelayedLinearPetalBullet(
                        new XY(P.X + v.X * 5, P.Y + v.Y * 5),
                        v * 0.75f,
                        Color.Yellow,
                        Color.Red,
                        3f,
                        120
                        )
                    );
            }
            Despawn();
        }
コード例 #2
1
        public override void Update(int t)
        {
            var world    = The.World;
            int interval = The.Difficulty <= Difficulty.Easy ? 12 : 2;
            int rays     = The.Difficulty.Choose(2, 2, 3, 5);

            if (t % interval == 0)
            {
                foreach (var v in Danmaku.Ring(new XY(0.004f * t), rays))
                {
                    world.Spawn(new PetalBullet(_p, v, Color.Lime));
                }
            }
            if (t % 4 == 0)
            {
                foreach (var v in Danmaku.Ring(new XY(-0.1f / rays * t), rays))
                {
                    world.Spawn(new PetalBullet(_p, v, Color.Cyan));
                }
            }
        }
コード例 #3
1
 protected override void Update(int t)
 {
     if (t % 120 == 0)
     {
         foreach (var v in Danmaku.Ring(new XY(_.Random.Angle()), 60))
         {
             _.World.Spawn(new LinearPetalBullet(P, v * 1f, Color.Magenta, Color.DarkMagenta, 3));
         }
     }
     if (t % 20 == 0 && _.Player != null && !_.Player.Despawned)
     {
         _.World.Spawn(
             new LinearRoundBullet(
                 P,
                 (_.Player.P - P).WithLength(2).Rotated(_.Random.SignedFloat() * 0.2f),
                 Color.Blue,
                 Color.Blue,
                 10
                 )
             );
     }
 }
コード例 #4
1
        protected override void Update(int t)
        {
            var   o  = World.Box.Center;
            float av = Mathf.PI / _.Difficulty.Choose(900, 900, 900, 900);
            int   dt = _.Difficulty.Choose(90, 80, 70, 60);

            if (t == 0)
            {
                _.World.Spawn(new HugeStar(new XY(o.X, World.Box.Top + 20), XY.Zero, 0, av));
                _.World.Spawn(new HugeStar(new XY(o.X, World.Box.Bottom - 20), XY.Zero, 0, av));
            }
            if (t % dt == 0)
            {
                // ReSharper disable once PossibleLossOfFraction - так и было задумано!
                float angle = t / dt * Mathf.phiAngle / 30;
                foreach (var v in Danmaku.Ring(new XY(angle), 30))
                {
                    _.World.Spawn(new LinearRoundBullet(new XY(World.Box.Left, o.Y), v, Color.Red, Color.Red));
                    _.World.Spawn(new LinearRoundBullet(new XY(World.Box.Right, o.Y), v, Color.Red, Color.Red));
                }
            }
        }
コード例 #5
1
ファイル: Recursion.cs プロジェクト: sanekrash/NupskouProject
        public override void Update(int t)
        {
            Color color;

            switch (t % 1800)
            {
            case 0:
                color = Color.Lime;
                break;

            case 300:
                color = Color.Yellow;
                break;

            case 600:
                color = Color.Red;
                break;

            case 900:
                color = Color.Magenta;
                break;

            case 1200:
                color = Color.Blue;
                break;

            case 1500:
                color = Color.Cyan;
                break;

            default: return;
            }
            XY v;

            switch (t % 1200)
            {
            case 0:
                v = XY.Down;
                break;

            case 300:
                v = XY.Left;
                break;

            case 600:
                v = XY.Up;
                break;

            case 900:
                v = XY.Right;
                break;

            default: return;
            }
            int bullets = The.Difficulty.Choose(5, 7, 9, 11);

            foreach (var w in Danmaku.Ring(1.5f * v, bullets))
            {
                The.World.Spawn(new RecursiveBullet(_p, w, color, 5));
            }
        }
コード例 #6
0
        public override void Update(int t)
        {
            var world = The.World;

            if (t % 60 == 0)
            {
                var v = new XY(The.Random.Angle());
                foreach (var w in Danmaku.Ring(4 * v, 24))
                {
                    world.Spawn(new SunflowerRay(_p, w));
                }
//                foreach (var w in Danmaku.Ring (5 * v.Rotated (Mathf.PI / 12), 12)) {
//                    world.Spawn (new SunflowerRay (_p, w));
//                }
            }
            if (t >= 120)
            {
                Despawn();
                return;
            }
            foreach (var v in Danmaku.Ring(2 * new XY(t * Mathf.phiAngle / 2), 2))
            {
                world.Spawn(new PetalBullet(_p, v, Color.Orange));
            }
        }
コード例 #7
0
 public override void Update(int t)
 {
     if (t % 90 == 0)
     {
         t /= 90;
         float angle = Mathf.phiAngle + (1.24f * t);
         foreach (var v in Danmaku.Ring(new XY(t * angle), 21))
         {
             The.World.Spawn(new BounceArrow(_p, 4 * v, Color.Blue));
         }
     }
 }
コード例 #8
0
/*
 *      public override void OnSpawn () {
 *          base.OnSpawn ();
 *          foreach (var v in Danmaku.Ring (2 * new XY(_.Random.Angle ()), 24)) {
 *              _.World.Spawn (new LinearPetalBeamBullet (_p, v, Color.Yellow, Color.Yellow, 5));
 *          }
 *      }
 */

        protected override void Update(int t)
        {
            if (t == _t)
            {
                Despawn();
                return;
            }
            foreach (var v in Danmaku.Ring(new XY(_a0 + t * Mathf.phiAngle / 2), 2))
            {
                _.World.Spawn(new SunflowerSeed(_p, v, 10f, 3f, _t - t));
            }
//            _.World.Spawn (new SunflowerSeed (_p, new XY (_a0 + t * Mathf.phiAngle), 10f, 3f, _t - t));
        }
コード例 #9
0
        private void Explode()
        {
            Despawn();

            int ringSize = 20;
            int lineSize = 2;

            foreach (var v in Danmaku.Ring(XY.Up, ringSize))
            {
                foreach (var w in Danmaku.Line(v, 1f, 1.5f, lineSize))
                {
                    The.World.Spawn(new PetalBullet(_target, w, Color.Yellow));
                }
            }
        }
コード例 #10
0
        private void Shoot()
        {
            var circle = Danmaku.Ring(new XY(_random), _.Difficulty.Choose(8, 12, 18, 24));

            foreach (var v in circle)
            {
                _.World.Spawn(
                    new LinearPetalBullet(
                        P,
                        v * _.Difficulty.Choose(2f, 2f, 2f, 3f),
                        Color.Blue,
                        Color.Blue,
                        3f
                        )
                    );
            }
        }