diff options
author | davesilver <nibor123@gmail.com> | 2010-07-15 16:50:48 (GMT) |
---|---|---|
committer | davesilver <nibor123@gmail.com> | 2010-07-15 16:50:48 (GMT) |
commit | 713f50c75f15c2e30990d838857a6c82cea1123f (patch) | |
tree | 40b943673345cc65de1f403747ec11bdbd61209a /DrawableObjectTests/DrawableObjectMoveScaleTest.py | |
parent | 31bbff1b166abae7d94c33ef69f7272acda36780 (diff) |
Updating Test
Diffstat (limited to 'DrawableObjectTests/DrawableObjectMoveScaleTest.py')
-rwxr-xr-x | DrawableObjectTests/DrawableObjectMoveScaleTest.py | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/DrawableObjectTests/DrawableObjectMoveScaleTest.py b/DrawableObjectTests/DrawableObjectMoveScaleTest.py index 2483757..82f3bb4 100755 --- a/DrawableObjectTests/DrawableObjectMoveScaleTest.py +++ b/DrawableObjectTests/DrawableObjectMoveScaleTest.py @@ -22,6 +22,17 @@ screen = pygame.display.set_mode(SIZE) #Screen Set 600x400 screen.fill((BACKGROUNDR, BACKGROUNDG, BACKGROUNDB)) +def blitAndFlip(self): + screen.fill((BACKGROUNDR, BACKGROUNDG, BACKGROUNDB)) + cn = 0 + while cnt < myScene.getListSize(): + + screen.blit(myScene.getObject(cnt).image[0], [myScene.getObject(cnt).getXPos(),myScene.getObject(cnt).getYPos()]) + cnt += 1 + + + pygame.display.flip() + switch1 = [ [pygame.image.load("%sa1/1%s"%("IndividualFrames/bmp16/",".bmp"))], [pygame.image.load("%sa1/2%s"%("IndividualFrames/bmp16/",".bmp"))], @@ -47,8 +58,8 @@ switch2 = [ ] dynamicObj = DynamicDrawableObject(switch1,'',1,0,0, 2, 2) -secondDynamicObj = DynamicDrawableObject(switch1,'',1,0,100, 2, 2) -staticObj = DynamicDrawableObject(switch2,'',1,40,40, 2, 2) +secondDynamicObj = DynamicDrawableObject(switch1,'',1,0,100, 3, 3) +staticObj = DynamicDrawableObject(switch2,'',1,40,40, 4, 4) initialList = [dynamicObj, secondDynamicObj] secondaryList = [staticObj] @@ -58,10 +69,10 @@ myScene.addObjects(secondaryList) myScene.nextFrame() cnt = 0 -while cnt < myScene.getListSize(): +while cnt < 20: + + myScene.move() + myScene.nextFrame() + blitAndFlip() - screen.blit(myScene.getObject(cnt).image[0], [myScene.getObject(cnt).getXPos(),myScene.getObject(cnt).getYPos()]) - cnt += 1 -pygame.display.flip() -time.sleep(5) |