TapTitanXNA_Aldecoa.Level.Update C# (CSharp) Method

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void
        public void Update(GameTime gameTime)
        {
            mouseState = Mouse.GetState();
              mouseX = mouseState.X;
              mouseY = mouseState.Y;
              prev_mpressed = mpressed;
              mpressed = mouseState.LeftButton == ButtonState.Pressed;
              time = gameTime.TotalGameTime.Seconds;

              hero.Update(gameTime);

             oldMouseState = mouseState;

             if (time % 2 == 0)
             {
             dmg += 0.5f;
             shiaOuch -= 0.5f;

             }

             if (attackButton.Update(gameTime, mouseX, mouseY, mpressed, prev_mpressed))
             {
            shiaOuch -= 5;
            dmg += 0.5f;
            shia.Update(gameTime);

            jojo.Update(gameTime);
             }
             if (shiaOuch <= 0)
             {
             Over = "Game Over";
             shiaOuch = 0;
             dmg = 0;

             }
             if (shiaOuch ==0 && mpressed)
             {
             game.Exit();

             }
        }