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:31:03 (GMT)
committer davesilver <nibor123@gmail.com>2010-07-27 14:31:03 (GMT)
commit0775423f804a189b35a4d467de3fd3a4943616b2 (patch)
treee96160deaa6d7391f810ac4603e38fd7a095f9b4 /devtools/CompleteTestKit
parent3fc7af4570a6eec82f62e0dba1b766107ebb6514 (diff)
Editing Sprite tests
Diffstat (limited to 'devtools/CompleteTestKit')
-rw-r--r--devtools/CompleteTestKit/DynamicDrawableObject2.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/devtools/CompleteTestKit/DynamicDrawableObject2.py b/devtools/CompleteTestKit/DynamicDrawableObject2.py
index e330c36..7ba5c5c 100644
--- a/devtools/CompleteTestKit/DynamicDrawableObject2.py
+++ b/devtools/CompleteTestKit/DynamicDrawableObject2.py
@@ -51,28 +51,24 @@ class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite):
#if self.animations[cnt] == self._current_anim:
- print 1
+ print self.animations.get(self._current_anim)[0]
+ print self.animations.get(self._current_anim)[0]
+
timePassed = t + self._last_update
if timePassed > self._delay:
- print 2
if self._frame < self.animations.get(self._current_anim)[0] or self._frame > self.animations.get(self._current_anim)[1]: #checking if I am in the animation and putting me there if I am not
- print 3
self._frame = self.animations.get(self._current_anim)[0]
- print 4
self._frame += timePassed/self._delay
- print 5
+
while self._frame >= self.animations.get(self._current_anim)[1]:
- print 6
framesPast = self._frame - self.animations.get(self._current_anim)[1]
self._frame = framesPast - 1 + self.animations.get(self._current_anim)[0]
- print 7
self.image = self._images[self._frame]
- print 8
self._last_update = timePassed%self._delay
- print 9
+
self._last_update = timePassed
def nextFrame(self):