From 287da47e1021552028325fac78f58009d6250f6f Mon Sep 17 00:00:00 2001 From: davesilver Date: Tue, 27 Jul 2010 15:03:16 +0000 Subject: Editing Sprite tests --- (limited to 'devtools/CompleteTestKit') diff --git a/devtools/CompleteTestKit/DrawableObject.py b/devtools/CompleteTestKit/DrawableObject.py index 24af0aa..ce7389f 100644 --- a/devtools/CompleteTestKit/DrawableObject.py +++ b/devtools/CompleteTestKit/DrawableObject.py @@ -16,7 +16,7 @@ class DrawableObject(pygame.sprite.Sprite): cnt += 1 self._start = pygame.time.get_ticks() self.image = self._images[0] - self._delay = 1.0 / fps + self._delay = 1000 / fps self._last_update = 0 self._frame = 0 self.animations = {} diff --git a/devtools/CompleteTestKit/DynamicDrawableObject2.py b/devtools/CompleteTestKit/DynamicDrawableObject2.py index aad95cb..5cef231 100644 --- a/devtools/CompleteTestKit/DynamicDrawableObject2.py +++ b/devtools/CompleteTestKit/DynamicDrawableObject2.py @@ -54,7 +54,7 @@ class DynamicDrawableObject(DrawableObject, pygame.sprite.Sprite): print self._delay timePassed = t + self._last_update print timePassed - if timePassed > self._delay: + if (1000 * timePassed) > self._delay: print "yes" 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 self._frame = self.animations.get(self._current_anim)[0] diff --git a/devtools/CompleteTestKit/dirtyTest2.py b/devtools/CompleteTestKit/dirtyTest2.py index 0604985..7cad73b 100644 --- a/devtools/CompleteTestKit/dirtyTest2.py +++ b/devtools/CompleteTestKit/dirtyTest2.py @@ -92,12 +92,4 @@ for aTrial in range(maxTrial): groups[image].clear(screen, background) #print 1/((time()-start)/FRAME) - group1.calcPosition() - print "Position" - print group1.getXPos() - print group1.getYPos() - group1.calcSize() - print "Size" - print group1.getXSize() - print group1.getYSize() pygame.display.flip() -- cgit v0.9.1