def __init__(self, application, performer, target, commands=None): BaseAction.__init__(self, application, commands) self.commands = commands or () self.application = application self.performer = performer self.target = target self.executed = False
def execute(self): active_camera = self.application.current_map.camera location = active_camera.getLocation() coords = location.getMapCoordinates() coords.x = self.position[0] coords.y = self.position[1] location.setMapCoordinates(coords) active_camera.setLocation(location) BaseAction.execute(self)
def __init__(self, application, position, commands=None): BaseAction.__init__(self, application, commands) self.position = position
def execute(self): self.application.set_global_lighting(self.red, self.green, self.blue) BaseAction.execute(self)
def __init__(self, application, red, green, blue, commands=None): BaseAction.__init__(self, application, commands) self.red = red self.green = green self.blue = blue