Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devtools/CompleteTestKit
diff options
context:
space:
mode:
authordavesilver <nibor123@gmail.com>2010-07-27 14:10:46 (GMT)
committer davesilver <nibor123@gmail.com>2010-07-27 14:10:46 (GMT)
commitd7ce19d938d40a8ad0caddf7b7c9e4bbbd6c1e29 (patch)
tree3eaeec8ef8c97162f10dc9b333c6bd7aac804917 /devtools/CompleteTestKit
parentef5647d2447a7a8e475be375299c28af9c706029 (diff)
Editing Sprite tests
Diffstat (limited to 'devtools/CompleteTestKit')
-rw-r--r--devtools/CompleteTestKit/DynamicDrawableObject2.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/devtools/CompleteTestKit/DynamicDrawableObject2.py b/devtools/CompleteTestKit/DynamicDrawableObject2.py
index 1fe1e3b..62b9ac4 100644
--- a/devtools/CompleteTestKit/DynamicDrawableObject2.py
+++ b/devtools/CompleteTestKit/DynamicDrawableObject2.py
@@ -50,10 +50,10 @@ class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite):
def update(self, t):
cnt = 0
- while cnt < len(animations):
-
- if animations[cnt] == self._current_anim:
-
+ while cnt < len(self.animations):
+
+ if self.animations[cnt] == self._current_anim:
+
timePassed = t + self._last_update
if timePassed > self._delay:
@@ -63,15 +63,15 @@ class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite):
self._frame += timePassed/self._delay
while self._frame >= self.animations.get(self._current_anim)[1]:
-
+
framesPast = self._frame - self.animations.get(self._current_anim)[1]
self._frame = framesPast - 1 + self.animations.get(self._current_anim)[0]
-
+
self.image = self._images[self._frame]
self._last_update = timePassed%self._delay
self._last_update = timePassed
-
- cnt = len(animations)
+
+ cnt = len(self.animations)
cnt += 1