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