public override void Update(GameTime gameTime)
        {
            input.Update(gameTime);

            playNext();

            base.Update(gameTime);
        }
Esempio n. 2
0
        public override void Update(GameTime gameTime)
        {
            //If the transition manager is running any transactions, do not update the menus.
            if (transitionManager.HasTransitions)
            {
                //Update any transitions.
                transitionManager.update();
            }
            //Else get the current menu and update it.
            else
            {
                MenuType currentMenu = getMenu(Stack.Peek());

                //Force the input to update.
                input.Update(gameTime);

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

                    //If there is a system, update it.
                    if (system != null)
                    {
                        back(system);

                        system.update(input);
                    }
                }
            }

            base.Update(gameTime);
        }