예제 #1
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)
        {
            //myPlayer.Update(gameTime);
            switch (myState)
            {
            case State.LOAD:
                myLoad.Update(gameTime);
                break;

            case State.MENU:
                myMenu.Update(gameTime);
                break;

            case State.PREPARE:
                myPrepare.Update(gameTime);
                break;

            case State.PLAY:
                myMapManager.Update(gameTime);
                break;

            case State.RESET:
                myReset = new Reset();
                break;

            case State.UPGRADE:
                myUpgrade.Update(gameTime);
                break;
            }
            base.Update(gameTime);
        }