startBattle() 공개 메소드

public startBattle ( List hrs, List enmys ) : void
hrs List
enmys List
리턴 void
예제 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.

            spriteBatch = new SpriteBatch(GraphicsDevice);
            battleMan   = new BattleManager();

            Menu.loadButton(Content);

            princessTxt = Content.Load <Texture2D>("whiteTest");
            mouseTxt    = Content.Load <Texture2D>("mouse");
            princess    = new Unit("Palette", new Vector2(200, 150), princessTxt, Color.AntiqueWhite);
            Unit.loadTxt(Content);
            testEnemy = new Unit("TestE", new Vector2(400, 150), princessTxt, Color.AntiqueWhite);
            heroes.Add(princess);
            enemies.Add(testEnemy);
            battleMan.startBattle(heroes, enemies);
            // TODO: use this.Content to load your game content here
        }
예제 #2
0
        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            if (Keyboard.GetState().IsKeyDown(Keys.B))
            {
                currentState = State.BATTLE;

                battleMan.startBattle(heroes, enemies);
            }

            battleMan.update();

            // TODO: Add your update logic here
            switch (currentState)
            {
            case State.MMENU:

                break;

            case State.OVERWORLD:

                break;

            case State.BATTLE:

                break;

            default:

                break;
            }

            base.Update(gameTime);
        }
예제 #3
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.

            spriteBatch = new SpriteBatch(GraphicsDevice);
            battleMan = new BattleManager();

            Menu.loadButton(Content);

            princessTxt = Content.Load<Texture2D>("whiteTest");
            mouseTxt = Content.Load<Texture2D>("mouse");
            princess = new Unit("Palette", new Vector2(200, 150), princessTxt, Color.AntiqueWhite);
            Unit.loadTxt(Content);
            testEnemy = new Unit("TestE", new Vector2(400,150), princessTxt, Color.AntiqueWhite);
            heroes.Add(princess);
            enemies.Add(testEnemy);
            battleMan.startBattle(heroes, enemies);
            // TODO: use this.Content to load your game content here
        }