Skip to content

Commit

Permalink
Marking sprites as dirty.
Browse files Browse the repository at this point in the history
Temporarily, we mark both sprites as always dirty, so
that we could see them rendered properly.
  • Loading branch information
n0nick committed Jun 1, 2012
1 parent d6996c7 commit 65a95af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions chimp.py
Expand Up @@ -68,6 +68,7 @@ def update(self):
self.rect.midtop = pos
if self.punching:
self.rect.move_ip(5, 10)
self.dirty = 1

def punch(self, target):
"returns true if the fist collides with the target"
Expand Down Expand Up @@ -100,6 +101,7 @@ def update(self):
self._spin()
else:
self._walk()
self.dirty = 1

def _walk(self):
"move the monkey across the screen, and turn at the ends"
Expand Down

0 comments on commit 65a95af

Please sign in to comment.