From 23120db5a02be924eb0003af07bf3319f55a9348 Mon Sep 17 00:00:00 2001 From: Rodolfo D. Arce S Date: Sat, 11 Jun 2011 21:40:34 +0000 Subject: Changed planting key and tree cutter speed, removed speed from HUD --- diff --git a/README b/README index 8931fc0..ba6ad9a 100644 --- a/README +++ b/README @@ -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 # diff --git a/main.py b/main.py index 426ca4d..b62fb07 100644 --- a/main.py +++ b/main.py @@ -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() diff --git a/ranger.py b/ranger.py index 88bfa67..183049c 100644 --- a/ranger.py +++ b/ranger.py @@ -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): -- cgit v0.9.1