Added the great northern wall.

This commit is contained in:
Sakse Dalum 2012-08-12 18:28:09 +02:00
parent debca3bab2
commit 84e0016c95
5 changed files with 22 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -31,11 +31,20 @@ import copy
class Block(worldobject.WorldObject):
def __init__(self, level, x, y, img_str='block1',
movable=False, visible=True):
movable=False, visible=True,
width=1, height=1):
self.__dict__.update(locals())
worldobject.WorldObject.__init__(self, level, x, y,
movable=movable, visible=visible)
for i in range(width):
for j in range(height):
if not i or not j :
self.level.objects.append(
InvisBlock(self.level,
self.x + 64 * i,
self.y - 48 * j))
self.load()
# self.orig_alphas = {

View File

@ -63,12 +63,15 @@ class Level1(level.Level):
self.player.set_init_pos()
for i in range(self.dimensions[0]):
self.objects.append(block.InvisBlock(self, i * 64,
0))
if not i % 3:
self.objects.append(block.Block(self, i * 64,
48 * 3,
self.imgs['wall_outside'],
width=3))
self.objects.append(block.InvisBlock(self, i * 64,
(self.dimensions[1]) * 48))
for i in range(self.dimensions[1]):
self.objects.append(block.InvisBlock(self, -64,
self.objects.append(block.InvisBlock(self, - 64,
i * 48))
self.objects.append(block.InvisBlock(self, self.dimensions[0] * 64,
i * 48))

View File

@ -57,13 +57,15 @@ class Level4(level.Level):
self.imgs['indoor%d' % random.randint(1, 6)]))
self.draw_background()
self.playfield = lm.generate_simple_playfield(16)
for (x, y), t in self.playfield.items():
x1, y1 = 64 * x, 48 * (y + 1)
if isinstance(t, lm.Source):
self.objects.append(block.Block(self, x1, y1, self.imgs['block3'], movable=False))
self.objects.append(block.Block(self, x1, y1,
self.imgs['block3'],
movable=False))
continue
def mir(b, x1, y1):
def f(x, y):
@ -114,7 +116,7 @@ class Level4(level.Level):
self.lasers.append(laser.Laser(
self, (x0 * 64, y0 * 48),
(x1 * 64, y1 * 48)))
def draw(self, window):
self._blit_background(window)

View File

@ -49,7 +49,7 @@ class Loader(object):
self.imgs[o] = pygame.image.load(os.path.join(
self.directory, 'blocks', '%s.png' % o))
l = ['hole', 'well']
l = ['hole', 'well', 'wall', 'wall_outside']
for o in l:
self.imgs[o] = pygame.image.load(os.path.join(
self.directory, '%s.png' % o))