diff options
author | Rodolfo D. Arce S <rodolfo.arce.s@gmail.com> | 2011-06-11 21:40:34 (GMT) |
---|---|---|
committer | Rodolfo D. Arce S <rodolfo.arce.s@gmail.com> | 2011-06-11 21:40:34 (GMT) |
commit | 23120db5a02be924eb0003af07bf3319f55a9348 (patch) | |
tree | ba075fdb23672ff54f60e92ff2e7f14962abf976 | |
parent | 3c78463a6d155eb1d5780023513dc66ef0ffffee (diff) |
-rw-r--r-- | README | 6 | ||||
-rw-r--r-- | main.py | 4 | ||||
-rw-r--r-- | ranger.py | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -6,5 +6,9 @@ Instructions: Tree cutters appear at a certain period of time, the more you tree cutters you get the faster they'll appear next time. -Press "p" to plant trees so you don't loose the game. If you end up with no trees you loose the game. +Press the LEFT CTRL key to plant trees so you don't loose the game. If you end up with no trees you loose the game. + +If too many trees are cutted, you'll move slower and so will the tree cutters, becuase there's no air. + +# All graphics from openclipart.org # @@ -155,7 +155,7 @@ while True: air = air + arbol.air # HUD text - hud_text = "Air: " + str(air) + " Score: " + str(score) + " Speed: " + str(ranger.speed) + hud_text = "Air: " + str(air) + " Score: " + str(score) font = pygame.font.Font(None, 36) text_hud = font.render( hud_text , 1, (0, 0, 0, 0)) screen.blit(text_hud, (0, 0)) @@ -179,6 +179,8 @@ while True: ranger.speed = math.fabs(air/10) else: ranger.speed = 1 + for cortador in cutter: + cortador.speed = ranger.speed else: exit() @@ -45,7 +45,7 @@ class Ranger: # Handle Tree planting key if event.type == pygame.KEYDOWN: if self.new_plant == False: - if event.key == pygame.K_p: + if event.key == pygame.K_LCTRL: self.plant = True def update(self): |