Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #advanced code for lives visualization
  2. heart_sprite = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/Heart_coraz%C3%B3n.svg/2000px-Heart_coraz%C3%B3n.svg.png"
  3. #setup list of 0 placeholders, these will be replaced with heart sprites
  4. lives_sprites = [0, 0, 0, 0, 0, 0]
  5. def display_lives():
  6. for life in range(p1.lives):
  7. heart = codesters.Sprite(heart_sprite, -230 + life * 30, 220)
  8. heart.set_size(0.01)
  9. lives_sprites[life] = heart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement