Exemplo n.º 1
0
        /// <summary>
        /// Called by substates to indicate they're ready. This state then
        /// Gets the necessary information from them.
        /// </summary>
        /// <param name="state"></param>
        public override void OnStateComplete(string completedState)
        {
            switch (completedState)
            {
            case ("Settings"):
                soundSelect.Play();                                    // Play the menu sound effect

                boxingManager.NumRounds = settingsManager.GetRounds(); // Get the number of rounds

                state = brawlgamestate.playerselect;                   // Move to the player select state
                // initialize the player select state
                playerSelectManager = new Player_Select_Popup(this, game.Content, inputs, bounds, game.GraphicsDevice);

                // We don't need the settings manager anymore, so de-reference it.
                settingsManager.Destruct();
                settingsManager = null;


                break;

            case ("PlayerSelect"):
                soundSelect.Play();     // Play sounds

                // Get the colors
                colors = playerSelectManager.GetPlayerColors;

                state          = brawlgamestate.loadout;
                loadoutManager = new LoadOut_Manager(this, bounds, inputs, items);
                loadoutManager.LoadContent(game.Content);
                loadoutManager.Activate(game.Content);

                playerSelectManager.Destruct();
                playerSelectManager = null;

                Debug.WriteLine("Entered Loadout state");

                break;

            case ("LoadOut"):
                soundSelect.Play();           // Play sounds

                state = brawlgamestate.brawl; // change the state

                // Set up the boxer's with their colors and equipment
                boxingManager.ApplySettings(colors, loadoutManager.equipment);
                boxingManager.Reset();

                // Unhook any event listenters and dereference the loadoutManager
                loadoutManager.Destruct();
                loadoutManager = null;

                Debug.WriteLine("Entered Boxing state");

                break;

            case ("Boxing"):
                break;
            }
        }
Exemplo n.º 2
0
        public Player_Select_Menu(ContentManager content, Player_Select_Popup popup, SpriteFont font, Rectangle bounds)
        {
            this.popup = popup;

            vTitle = new Vector2(bounds.X + bounds.Width / 2 - font.MeasureString("Color Select").X / 2,
                    bounds.Y + bounds.Height / 4);

            this.bounds = bounds;
        }
Exemplo n.º 3
0
        public Player_Select_Menu(ContentManager content, Player_Select_Popup popup, SpriteFont font, Rectangle bounds)
        {
            this.popup = popup;

            vTitle = new Vector2(bounds.X + bounds.Width / 2 - font.MeasureString("Color Select").X / 2,
                                 bounds.Y + bounds.Height / 4);

            this.bounds = bounds;
        }