Moat has been added to level 1.

This commit is contained in:
Sakse Dalum
2012-08-09 13:54:27 +02:00
parent 1ebd4a9c91
commit 9456b30c8c
4 changed files with 133 additions and 47 deletions

View File

@@ -31,7 +31,7 @@ import copy
class WorldObject(object):
def __init__(self, level, x, y, z=0, direction=(1, 0), speed=4,
tile_x=64, tile_y=48,
movable=False, blocking=True, is_moving=False):
movable=False, blocking=True, is_moving=False, visible=True):
self.__dict__.update(locals())
self.init_x = self.move_x = self.x = x - (x % self.tile_x)
@@ -41,6 +41,8 @@ class WorldObject(object):
self.holding = None
self.holder = None
self.is_currently_opaque = True
if hasattr(self, 'img'):
self.img = copy.copy(self.img)
@@ -98,6 +100,9 @@ class WorldObject(object):
def activate(self, setting):
pass
def update_alpha(self):
pass
def set_alpha(self, value):
"""
Set the relative translucency of the per-pixel-alpha image.