Ejemplo n.º 1
0
        private static IEnumerable <bool> GetSeqnencer()
        {
            for (; ;)
            {
                Game.I.SetWall(new Wall0003());

                Game.I.AddEnemy(IEnemies.Load(new Enemy0002(), DDConsts.Screen_W + 50.0, DDConsts.Screen_H / 2.0));

                for (int c = 0; c < 500; c++)
                {
                    yield return(true);
                }

                Game.I.SetWall(new Wall0004());

                Game.I.AddEnemy(IEnemies.Load(new Enemy0001(), DDConsts.Screen_W + 50.0, DDConsts.Screen_H / 2.0));

                for (int c = 0; c < 500; c++)
                {
                    yield return(true);
                }

                Game.I.AddEnemy(IEnemies.Load(new Boss0001(), -1.0, 0.0));

                for (; ;)
                {
                    yield return(true);                    // HACK
                }
            }
        }
Ejemplo n.º 2
0
        public bool EachFrame()
        {
            this.Frame++;

            if (this.Frame % 20 == 0)
            {
                Game.I.AddEnemy(IEnemies.Load(new Tama0001(), this.X, this.Y));
            }

            D2Point mvPt = DDUtils.AngleToPoint(
                DDUtils.GetAngle(Game.I.Player.X - this.X, Game.I.Player.Y - this.Y),
                2.5
                );

            this.X += mvPt.X;
            this.Y += mvPt.Y;

            return(DDUtils.IsOutOfScreen(new D2Point(this.X, this.Y), 64.0) == false);
        }
Ejemplo n.º 3
0
        private static IEnumerable <bool> GetSeqnencer()
        {
            for (; ;)
            {
                Game.I.SetWall(new Wall0001());

                foreach (DDScene scene in DDSceneUtils.Create(10))
                {
                    Game.I.AddEnemy(IEnemies.Load(
                                        new Enemy0001(),
                                        DDConsts.Screen_W + 50.0,
                                        100.0 + scene.Rate * 200.0
                                        ));

                    for (int c = 0; c < 20; c++)
                    {
                        yield return(true);
                    }
                }

                for (int c = 0; c < 60; c++)
                {
                    yield return(true);
                }

                foreach (DDScene scene in DDSceneUtils.Create(10))
                {
                    Game.I.AddEnemy(IEnemies.Load(
                                        new Enemy0001(),
                                        DDConsts.Screen_W + 50.0,
                                        DDConsts.Screen_H - 100.0 - scene.Rate * 200.0
                                        ));

                    for (int c = 0; c < 20; c++)
                    {
                        yield return(true);
                    }
                }

                for (int c = 0; c < 60; c++)
                {
                    yield return(true);
                }

                Game.I.SetWall(new Wall0002());

                foreach (DDScene scene in DDSceneUtils.Create(20))
                {
                    Game.I.AddEnemy(IEnemies.Load(
                                        new Enemy0001(),
                                        DDConsts.Screen_W + 50.0,
                                        DDConsts.Screen_H * DDUtils.Random.Real()
                                        ));

                    for (int c = 0; c < 10; c++)
                    {
                        yield return(true);
                    }
                }

                for (int c = 0; c < 60; c++)
                {
                    yield return(true);
                }

                foreach (DDScene scene in DDSceneUtils.Create(20))
                {
                    Game.I.AddEnemy(IEnemies.Load(
                                        new Enemy0001(),
                                        DDConsts.Screen_W + 50.0,
                                        DDConsts.Screen_H * DDUtils.Random.Real()
                                        ));

                    for (int c = 0; c < 10; c++)
                    {
                        yield return(true);
                    }
                }

                for (int c = 0; c < 60; c++)
                {
                    yield return(true);
                }
            }
        }