diff options
author | Rodolfo D. Arce S <rodolfo.arce.s@gmail.com> | 2011-05-12 18:53:38 (GMT) |
---|---|---|
committer | Rodolfo D. Arce S <rodolfo.arce.s@gmail.com> | 2011-05-12 18:53:38 (GMT) |
commit | 843daab512ec3e9f07077e6feaa91711afb5f64f (patch) | |
tree | 8941bc8bd8622294c6c7cbc40d465ecf14d8ddd8 | |
parent | 5a7e21902636fd1bea66ca3fde3ecdff73a5ade3 (diff) |
Added score text in top left
-rw-r--r-- | main.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -88,9 +88,17 @@ while not exit: continue start_time = current_time - # draw the background first, because it will cover all the screen + # draw the background first, because it will cover all the screen screen.blit(object_background, (0,0)) - # draw everything else over the background + # draw everything else over the background + + # Score text + score = 10 + score_current = "Score: " + str(score) + font = pygame.font.Font(None, 36) + text = font.render( score_current , 1, (0, 0, 0, 0)) + screen.blit(text, (0, 0)) + # Robot screen.blit(object_robot, (position_robot[0], position_robot[1])) # Move the character around the screen |