title: how to spawn a sprite after a time limit and how to display a timer pygame
body: <p>i would like to spawn a 'boss' Sprite after a certain time has passed or x amount of mobs have spawned and how could i display the timer on the screen.</p>
  
  <p><a href="https://imgur.com/a/aJLnG" rel="nofollow noreferrer">Images</a></p>
  
  <p><a href="https://pastebin.com/tJukuEFa" rel="nofollow noreferrer">Current Code</a></p>
  
  <p>class for boss</p>
  
  <pre><code>class Boss(pygame.sprite.Sprite):
  def __init__(self):
      pygame.sprite.Sprite.__init__(self)
      self.image = pygame.transform.scale(boss_img, (150, 200))
      self.image.set_colorkey(Black)
      self.rect = self.image.get_rect()
      self.rect.center = ((Width / 2, -70))
      self.speedy = 1
      self.shoot_delay = 250
      self.last_shot = pygame.time.get_ticks()
      self.hp = 150
      self.dead = False
  
  def update(self):
      if self.hp &lt;= 25:
          self.speedy = 3
      if self.rect.top &gt; Height + 10:
          player.lives = 0
  </code></pre>