Azmyth.Mono.Game1.Update C# (CSharp) Method

Update() protected method

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.
protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void
        protected override void Update(GameTime gameTime)
        {
            InputManager.Update(gameTime);

               // if (m_lastTime == null)
             //   m_lastTime = gameTime.TotalGameTime;

            if (InputManager.PadPressed(PlayerIndex.One, Buttons.Back) || InputManager.KeyReleased(Keys.OemTilde))
            {
                Exit();
            }

               // if (InputManager.KeyPressed(Keys.Escape) || InputManager.PadPressed(PlayerIndex.One, Buttons.Start))
               // {
                //m_stateManager.SetState(GameStates.MainMenu);
            //}

            m_tileSize += ((float)InputManager.MouseWheel());

            if (m_tileSize < 0)
                m_tileSize = 0;

            if (InputManager.KeyHeld(Keys.W) || InputManager.ThumbUpPressed(PlayerIndex.One, ThumbSticks.Left))
            {
                Vector2 v = Vector2.Transform(new Vector2(m_offsetX, m_offsetY), Matrix.CreateTranslation(0, -1, 0));

                m_offsetX = v.X;
                m_offsetY = v.Y;
            }

            if (InputManager.KeyHeld(Keys.S) || InputManager.ThumbDownPressed(PlayerIndex.One, ThumbSticks.Left))
            {
                Vector2 v = Vector2.Transform(new Vector2(m_offsetX, m_offsetY), Matrix.CreateTranslation(0, 1, 0));
                m_offsetX = v.X;
                m_offsetY = v.Y;
            }

            if (InputManager.KeyHeld(Keys.A) || InputManager.ThumbLeftPressed(PlayerIndex.One, ThumbSticks.Left))
            {
                Vector2 v = Vector2.Transform(new Vector2(m_offsetX, m_offsetY), Matrix.CreateTranslation(-1, 0, 0));
                m_offsetX = v.X;
                m_offsetY = v.Y;
            }

            if (InputManager.KeyHeld(Keys.D) || InputManager.ThumbRightPressed(PlayerIndex.One, ThumbSticks.Left))
            {
                Vector2 v = Vector2.Transform(new Vector2(m_offsetX, m_offsetY), Matrix.CreateTranslation(1, 0, 0));
                m_offsetX = v.X;
                m_offsetY = v.Y;
            }

            //m_elapsedTime += gameTime.ElapsedGameTime;

            base.Update(gameTime);
        }