Esempio n. 1
0
        public override void Update(GameTime gameTime)
        {
            //Console.WriteLine("Menu State");
            gameBackground.Update(gameTime);
            foreach (var component in components)
            {
                component.Update(gameTime);
            }

            //if instructions button is pressed then update
            if (isInstructionsPressed)
            {
                gamemenuoptions.updatesInstructions(gameTime, ref isInstructionsPressed);
            }
        }
        public override void Update(GameTime gameTime, SpriteBatch spriteBatch)
        {
            //Console.WriteLine("Menu State");
            gameBackground.Update(gameTime);

            //if instructions button is pressed then update
            if (isInstructionsPressed)
            {
                gamemenuoptions.updatesInstructions(gameTime, ref isInstructionsPressed);
            }
            else if (isSelectLevelPressed)//if select Level button is pressed then update
            {
                levelSelector.update(gameTime, spriteBatch, ref isSelectLevelPressed);
            }
            else
            {
                foreach (var component in components)
                {
                    component.Update(gameTime);
                }
            }
        }