Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo 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)
commit843daab512ec3e9f07077e6feaa91711afb5f64f (patch)
tree8941bc8bd8622294c6c7cbc40d465ecf14d8ddd8
parent5a7e21902636fd1bea66ca3fde3ecdff73a5ade3 (diff)
Added score text in top left
-rw-r--r--main.py12
1 files changed, 10 insertions, 2 deletions
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