Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorRodolfo D. Arce S <rodolfo.arce.s@gmail.com>2011-06-02 22:11:11 (GMT)
committer Rodolfo D. Arce S <rodolfo.arce.s@gmail.com>2011-06-02 22:11:11 (GMT)
commit8074c1bd88245430ca03bfa919e822d371470998 (patch)
tree4293bf8ed1804ae9d2ea134974bd6ca819ee3f89 /main.py
parentb83b3fcc8ff50fe4452c3e6c278b9925e5ec210a (diff)
Added tree cutter and some basic movement for it
Diffstat (limited to 'main.py')
-rw-r--r--main.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/main.py b/main.py
index 362f6e6..cf45384 100644
--- a/main.py
+++ b/main.py
@@ -7,8 +7,11 @@ from pygame import K_ESCAPE
from pygame.locals import *
from random import randint
+
from tree import Tree
from ranger import Ranger
+from cutter import Cutter
+
pygame.init()
@@ -34,6 +37,12 @@ unit = 1
ranger_speed = 4
ranger = Ranger(window_h, window_w, ranger_speed)
+# Cutter
+cutter_speed = 3
+cutter = Cutter(window_h, window_w, cutter_speed)
+
+
+
# Draw background
screen.fill(bg_color)
# Draw everything on top of that
@@ -76,6 +85,7 @@ while True:
# Update ranger position based on events
ranger.update()
+ cutter.update()
# Draw background
screen.fill(bg_color)
@@ -86,10 +96,9 @@ while True:
text = font.render( score_text , 1, (0, 0, 0, 0))
screen.blit(text, (0, 0))
- #for arbol in trees:
- # trees.remove(arbol)
-
ranger.draw(screen)
+ cutter.draw(screen)
+
for arbol in trees:
arbol.draw(screen)