diff options
author | coolestdude1 <arielzamparini@gmail.com> | 2010-02-24 20:48:38 (GMT) |
---|---|---|
committer | coolestdude1 <arielzamparini@gmail.com> | 2010-02-24 20:48:38 (GMT) |
commit | ab0a03f9dc94e8c8e8325e0ebf51b1d9e0369fe1 (patch) | |
tree | ef8e3d7dad31157ffd4af234146e71de32a0f2d8 | |
parent | 8b24b119282531bbdf651b5e747dbc9ad052291b (diff) |
-rw-r--r-- | blocku.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -164,6 +164,7 @@ class Game: # load images to pipe to the sprite classes blockImg = load_image('block.png') Block.images = [blockImg] + gridImg = load_image('grid.png') # the test will need rects and positions i sugest make some kind of default # this information can be held by each block as they are created but is made here @@ -173,6 +174,7 @@ class Game: else: background = background.convert() + background.blit(gridImg,(200,200)) screen.blit(background,(0,0)) pygame.display.flip() @@ -187,6 +189,7 @@ class Game: #main blocku code structs blocks = pygame.sprite.Group() Block.containers = blocks,spriteBatch + #blocks are Block(n,s,e,w,x,y) xy= starting position aBlock = Block(1,2,3,4,200,200) bBlock = Block(5,6,7,8,300,300) @@ -266,6 +269,7 @@ class Game: draw = spriteBatch.draw(screen) pygame.display.update(draw) + # Try to stay at 30 FPS self.clock.tick(30) |