Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/MAFH2/drawableobject/Spritesheet.py
diff options
context:
space:
mode:
Diffstat (limited to 'MAFH2/drawableobject/Spritesheet.py')
-rwxr-xr-xMAFH2/drawableobject/Spritesheet.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/MAFH2/drawableobject/Spritesheet.py b/MAFH2/drawableobject/Spritesheet.py
index 9fac747..bce2db5 100755
--- a/MAFH2/drawableobject/Spritesheet.py
+++ b/MAFH2/drawableobject/Spritesheet.py
@@ -4,7 +4,7 @@ class Spritesheet:
"""
Class from http://www.scriptedfun.com/transcript-2-using-sprite-sheets-and-drawing-the-background/
- This class can be used to seporate images from the sprite sheet
+ This class can be used to seperate images from the sprite sheet
"""
def __init__(self, filename):
self.sheet = pygame.image.load(filename).convert_alpha()
@@ -13,7 +13,8 @@ class Spritesheet:
def imgat(self, rect, myColorKey = None):
rect = pygame.Rect(rect)
image = pygame.Surface(rect.size).convert_alpha()
- if myColorKey == None: myColorKey = (255,0,255)
+ if myColorKey == None:
+ myColorKey = (255,0,255)
image.set_colorkey(myColorKey)
image.blit(self.sheet, (0, 0), rect)
return image
@@ -28,5 +29,5 @@ class Spritesheet:
rect_list = []
for y in range(0, rows):
for x in range(0, cols):
- rect_list.append( (width*x, height*y, width, height,) )
+ rect_list.append((width*x, height*y, width, height))
return self.imgsat( rect_list, myColorKey)