Added the great northern wall.
This commit is contained in:
parent
debca3bab2
commit
84e0016c95
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
|
@ -31,11 +31,20 @@ import copy
|
||||||
|
|
||||||
class Block(worldobject.WorldObject):
|
class Block(worldobject.WorldObject):
|
||||||
def __init__(self, level, x, y, img_str='block1',
|
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())
|
self.__dict__.update(locals())
|
||||||
worldobject.WorldObject.__init__(self, level, x, y,
|
worldobject.WorldObject.__init__(self, level, x, y,
|
||||||
movable=movable, visible=visible)
|
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.load()
|
||||||
|
|
||||||
# self.orig_alphas = {
|
# self.orig_alphas = {
|
||||||
|
|
|
@ -63,12 +63,15 @@ class Level1(level.Level):
|
||||||
self.player.set_init_pos()
|
self.player.set_init_pos()
|
||||||
|
|
||||||
for i in range(self.dimensions[0]):
|
for i in range(self.dimensions[0]):
|
||||||
self.objects.append(block.InvisBlock(self, i * 64,
|
if not i % 3:
|
||||||
0))
|
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.objects.append(block.InvisBlock(self, i * 64,
|
||||||
(self.dimensions[1]) * 48))
|
(self.dimensions[1]) * 48))
|
||||||
for i in range(self.dimensions[1]):
|
for i in range(self.dimensions[1]):
|
||||||
self.objects.append(block.InvisBlock(self, -64,
|
self.objects.append(block.InvisBlock(self, - 64,
|
||||||
i * 48))
|
i * 48))
|
||||||
self.objects.append(block.InvisBlock(self, self.dimensions[0] * 64,
|
self.objects.append(block.InvisBlock(self, self.dimensions[0] * 64,
|
||||||
i * 48))
|
i * 48))
|
||||||
|
|
|
@ -57,13 +57,15 @@ class Level4(level.Level):
|
||||||
self.imgs['indoor%d' % random.randint(1, 6)]))
|
self.imgs['indoor%d' % random.randint(1, 6)]))
|
||||||
|
|
||||||
self.draw_background()
|
self.draw_background()
|
||||||
|
|
||||||
self.playfield = lm.generate_simple_playfield(16)
|
self.playfield = lm.generate_simple_playfield(16)
|
||||||
|
|
||||||
for (x, y), t in self.playfield.items():
|
for (x, y), t in self.playfield.items():
|
||||||
x1, y1 = 64 * x, 48 * (y + 1)
|
x1, y1 = 64 * x, 48 * (y + 1)
|
||||||
if isinstance(t, lm.Source):
|
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
|
continue
|
||||||
def mir(b, x1, y1):
|
def mir(b, x1, y1):
|
||||||
def f(x, y):
|
def f(x, y):
|
||||||
|
@ -114,7 +116,7 @@ class Level4(level.Level):
|
||||||
self.lasers.append(laser.Laser(
|
self.lasers.append(laser.Laser(
|
||||||
self, (x0 * 64, y0 * 48),
|
self, (x0 * 64, y0 * 48),
|
||||||
(x1 * 64, y1 * 48)))
|
(x1 * 64, y1 * 48)))
|
||||||
|
|
||||||
def draw(self, window):
|
def draw(self, window):
|
||||||
self._blit_background(window)
|
self._blit_background(window)
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ class Loader(object):
|
||||||
self.imgs[o] = pygame.image.load(os.path.join(
|
self.imgs[o] = pygame.image.load(os.path.join(
|
||||||
self.directory, 'blocks', '%s.png' % o))
|
self.directory, 'blocks', '%s.png' % o))
|
||||||
|
|
||||||
l = ['hole', 'well']
|
l = ['hole', 'well', 'wall', 'wall_outside']
|
||||||
for o in l:
|
for o in l:
|
||||||
self.imgs[o] = pygame.image.load(os.path.join(
|
self.imgs[o] = pygame.image.load(os.path.join(
|
||||||
self.directory, '%s.png' % o))
|
self.directory, '%s.png' % o))
|
||||||
|
|
Loading…
Reference in New Issue