Пример #1
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);

            texture = Content.Load <Texture2D>("Sprites\\bullet");
            parser.ParseXML(@"Content\xml\sample.xml"); ///BulletMLを解析
            //parser.ParseXML(@"Content\xml\[1943]_rolling_fire.xml");
            //parser.ParseXML(@"Content\xml\[Guwange]_round_2_boss_circle_fire.xml");
            //parser.ParseXML(@"Content\xml\[Guwange]_round_3_boss_fast_3way.xml");
            //parser.ParseXML(@"Content\xml\[Guwange]_round_4_boss_eye_ball.xml");
            //parser.ParseXML(@"Content\xml\[G_DARIUS]_homing_laser.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_1_boss_grow_bullets.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_2_boss_struggling.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_3_boss_back_burst.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_3_boss_wave_bullets.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_4_boss_fast_rocket.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_5_boss_last_round_wave.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_5_middle_boss_rockets.xml");
            //parser.ParseXML(@"Content\xml\[Progear]_round_6_boss_parabola_shot.xml");
            //parser.ParseXML(@"Content\xml\[Psyvariar]_X-A_boss_opening.xml");
            //parser.ParseXML(@"Content\xml\[Psyvariar]_X-A_boss_winder.xml");
            //parser.ParseXML(@"Content\xml\[Psyvariar]_X-B_colony_shape_satellite.xml");
            //parser.ParseXML(@"Content\xml\[XEVIOUS]_garu_zakato.xml");
            //BulletMLの初期化
            BulletMLManager.Init(new MyBulletFunctions());

            //敵を一つ画面中央に作成し、弾を吐くよう設定
            mover     = MoverManager.CreateMover();
            mover.pos = new Vector2(graphics.PreferredBackBufferWidth / 2, graphics.PreferredBackBufferHeight / 2);
            mover.SetBullet(parser.tree); //BulletMLで動かすように設定
        }
Пример #2
0
        public override void Activate(Renderer renderer)
        {
            base.Activate(renderer);

            userInterfaceManager           = new UserInterfaceManager(ContentManager);
            agentManager                   = new AgentManager(ContentManager);
            agentManager.ScoreNeedsUpdate += agentManager_ScoreNeedsUpdate;

            gameBoard          = ControlFactory.CreateIcon(ContentManager, "InGameBoard");
            gameBoard.Position = new Vector(0, 59);

            textureBackgroundTile = ContentManager.GetTexture("SplashBackgroundTile");

            Controls.Add(gameBoard);

            bulletMoverManager = new BulletMoverManager(ContentManager);

            parser = new BulletMLParser();
            parser.ParseXML(String.Format(@"Content\BulletPatterns\{0}", "[Psyvariar]_X-B_colony_shape_satellite.xml"));

            Icon iconOpponent = ControlFactory.CreateIcon(ContentManager, "Enemy");

            opponent = new Opponent(Vector.Zero, iconOpponent);
            opponent.TeleportTo(new Vector(100, 100));
            opponent.BulletMover = bulletMoverManager.CreateBulletMover(opponent.Position, parser.tree);
        }