Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update():
- global score
- if keyboard.left:
- fox.x = fox.x - 2
- elif keyboard.right:
- fox.x = fox.x + 2
- elif keyboard.up:
- fox.y = fox.y - 2
- elif keyboard.down:
- fox.y = fox.y + 2
- coin_collected = fox.colliderect(coin)
- if coin_collected:
- score = score + 10
- place_coin()
Advertisement
Add Comment
Please, Sign In to add comment