diff options
author | coolestdude1 <arielzamparini@gmail.com> | 2010-02-24 19:59:50 (GMT) |
---|---|---|
committer | coolestdude1 <arielzamparini@gmail.com> | 2010-02-24 19:59:50 (GMT) |
commit | 3bc2155085bf183977e10ce37eb5debc24e005b3 (patch) | |
tree | 9b72df90b5bc8519aeaaf9462d182ac0d4fcaaa5 | |
parent | eb22c65f8f0c66b3e335cb2571c6a1863fb3c218 (diff) |
fixed rotation variables
-rw-r--r-- | blocku.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -74,10 +74,10 @@ class Block(pygame.sprite.Sprite): #keep the block on the screen self.rect = self.rect.clamp(SCREENRECT) self.image = self.images[0].copy() - self.image.blit(self.font.render('1', 0, self.color),(30,0)) - self.image.blit(self.font.render('2', 0, self.color),(50,25)) - self.image.blit(self.font.render('3', 0, self.color),(25,50)) - self.image.blit(self.font.render('4', 0, self.color),(5,25)) + self.image.blit(self.font.render(str(self.north), 0, self.color),(26,3)) + self.image.blit(self.font.render(str(self.east), 0, self.color),(47,25)) + self.image.blit(self.font.render(str(self.south), 0, self.color),(26,47)) + self.image.blit(self.font.render(str(self.west), 0, self.color),(5,25)) # game logic here for snapping to grid ...? # when the block is snapped to the grid clamp the rect there def move(self, direction): @@ -105,7 +105,7 @@ class Block(pygame.sprite.Sprite): self.east = self.south self.south = self.west self.west = temp - print self.north, self.east, self.south, self.west + #print self.north, self.east, self.south, self.west class Puzzle: def __init__(self): @@ -201,6 +201,7 @@ class Game: keyDown = False # it is important to note that like xna the origin is 0,0 # the top left of the current window + # print is trace in console # and increases as you go down and to the right # pygame has a collision detector under pygame.sprite.spritecollide(group,group,dokill) # this will return a list of colliders, dokill will remove the colliders from the parrent group if true |