From ab0a03f9dc94e8c8e8325e0ebf51b1d9e0369fe1 Mon Sep 17 00:00:00 2001 From: coolestdude1 Date: Wed, 24 Feb 2010 20:48:38 +0000 Subject: made the grid part of the background for now --- diff --git a/blocku.py b/blocku.py index b5fb014..79baaf1 100644 --- a/blocku.py +++ b/blocku.py @@ -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) -- cgit v0.9.1