From 843daab512ec3e9f07077e6feaa91711afb5f64f Mon Sep 17 00:00:00 2001 From: Rodolfo D. Arce S Date: Thu, 12 May 2011 18:53:38 +0000 Subject: Added score text in top left --- diff --git a/main.py b/main.py index 101b2de..66db0eb 100644 --- a/main.py +++ b/main.py @@ -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 -- cgit v0.9.1