title: trying to draw over sprite or change picture pyglet
body: <p>I am trying to learn pyglet and practice some python coding with a questionnaire thing, but I am unable to find a way to make the background picture be removed or drawn on top of or something for 10 seconds. I am new and am lacking in a lot of the knowledge I would need, thank you for helping!</p>
  
  <pre><code>import pyglet
  from pyglet.window import Window
  from pyglet.window import key
  from pyglet import image
  import time
  
  card1 = False
  cat_image = pyglet.image.load("cat.png")
  dog_image = pyglet.image.load("dog.png")
  image = pyglet.image.load("backg.png")
  background_sprite = pyglet.sprite.Sprite(image)
  cat = pyglet.sprite.Sprite(cat_image)
  dog = pyglet.sprite.Sprite(dog_image)
  window = pyglet.window.Window(638, 404, "Life")
  mouse_pos_x = 0
  mouse_pos_y = 0
  catmeme = pyglet.image.load("catmeme.png")
  sprite_catmeme = pyglet.sprite.Sprite(catmeme)
  
  @window.event
  def on_draw():
      window.clear()
      background_sprite.draw()
      card_draw1(63, 192, 385, 192)
  def card1():
      while time.time() &lt; (time.time() + 10):
          window.clear()
          sprite_catmeme.draw()
  @window.event
  def card_draw1(x1, y1, x2, y2):
      cat.set_position(x1, y1)
      dog.set_position(x2, y2)
      cat.draw()
      dog.draw()
  def card_draw2():
      pass
  @window.event
  def on_mouse_press(x, y, button, modifiers):
      if x &gt; cat.x and x &lt; (cat.x + cat.width):
          if y &gt; cat.y and y &lt; (cat.y + cat.height):
              card1()
  game = True
  while game:
      on_draw()
      pyglet.app.run()
  </code></pre>