public override void Draw(SpriteBatch spriteBatch) { spriteBatch.Begin(transformMatrix: camera.GetViewMatrix()); Floor.Draw(spriteBatch); foreach (var collidable in collideableSprites) { collidable.Draw(spriteBatch); } foreach (var moveable in moveableSprites) { moveable.Draw(spriteBatch); } foreach (var enemy in moveableSprites.OfType <Enemy>()) { enemy.Draw(spriteBatch); } foreach (var redEnemy in moveableSprites.OfType <RedEnemy>()) { redEnemy.Draw(spriteBatch); } spriteBatch.End(); spriteBatch.Begin(); cursor.Draw(spriteBatch); continueButton.Draw(spriteBatch); livesCounter.Draw(spriteBatch); woodPileCounter.Draw(spriteBatch); nailCounter.Draw(spriteBatch); cursor.Draw(spriteBatch); TimeSpan time = new TimeSpan(0, 0, (int)elapsedTime); spriteBatch.End(); }
public override void Draw(SpriteBatch spriteBatch) { if (isDying == false) { redEnemyLivesCounter.Draw(spriteBatch); } base.Draw(spriteBatch); }