Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcoolestdude1 <arielzamparini@gmail.com>2010-02-24 20:48:38 (GMT)
committer coolestdude1 <arielzamparini@gmail.com>2010-02-24 20:48:38 (GMT)
commitab0a03f9dc94e8c8e8325e0ebf51b1d9e0369fe1 (patch)
treeef8e3d7dad31157ffd4af234146e71de32a0f2d8
parent8b24b119282531bbdf651b5e747dbc9ad052291b (diff)
made the grid part of the background for nowHEADmaster
-rw-r--r--blocku.py4
1 files changed, 4 insertions, 0 deletions
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)