Пример #1
0
        public override void Draw(GameTime gameTime)
        {
            spriteBatch.Begin();

            //If there are transitions running, do not draw any menus.
            if (transitionManager.HasTransitions)
            {
                //Draw any transitions.
                transitionManager.draw(spriteBatch);
            }
            //Else draw the current menu.
            else
            {
                MenuType currentMenu = getMenu(Stack.Peek());

                //If there is a menu registered, draw it.
                if (currentMenu != null)
                {
                    currentMenu.draw(spriteBatch);
                }
                //Else check to see if there are any systems registered.
                else
                {
                    SystemType system = getSystem(Stack.Peek());

                    //If there is a system, draw it.
                    if (system != null)
                    {
                        system.draw(spriteBatch);
                    }
                }
            }

            spriteBatch.End();

            base.Draw(gameTime);
        }
Пример #2
0
        public override void draw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch)
        {
            baseMenu.draw(spriteBatch);

            base.draw(spriteBatch);
        }