public void update(GameTime gameTime) { nextButton.update(gameTime, player.Hitbox); platform.update(gameTime); platform1.update(gameTime); platform2.update(gameTime); platform3.update(gameTime); platform4.update(gameTime); platform5.update(gameTime); if (player.health <= 100 && player.health > 0) { hpHearth.update(gameTime); } if (player.health <= 200 && player.health > 100) { hpHearth1.update(gameTime); } if (player.health <= 300 && player.health > 200) { hpHearth2.update(gameTime); } if (player.health <= 400 && player.health > 300) { hpHearth3.update(gameTime); } if (player.health <= 500 && player.health > 400) { hpHearth4.update(gameTime); } player.update(gameTime); for (int i = 0; i < enemies.Count; i++) { enemies[i].update(gameTime); if (enemies[i].needsKill) { enemies.RemoveAt(i); GameStage.score += 10; } } }
public void update(GameTime gameTime) { player.update(gameTime); playButton.update(gameTime, player.Hitbox); exitButton.update(gameTime, player.Hitbox); }