def char_factory(name): CHAR_IMAGES = {'Andy': (charset_path('naked_man.png'), 0), 'Brenda': ('test_chars.png', 1), 'Charles': ('test_chars.png', 0), 'Dylan': ('test_chars.png', 2)} image_and_index = CHAR_IMAGES[name] return Character(name, image_and_index[0], image_and_index[1])
def __init__(self): MapObject.__init__(self, MapObject.OBSTACLE, image_file=charset_path('chest.png'), image_index=0, facing=UP, basic_animation=[[0]]) self.closed = True self.filled = True self.shapeshift = 0
def __init__(self, closed=True): MapObject.__init__(self, MapObject.OBSTACLE, image_file=charset_path('chest.png'), image_index=0, basic_animation=[[0]]) if closed: self.facing = UP self.closed = closed
def char_factory(name): CHAR_IMAGES = { 'Andy': (charset_path('naked_man.png'), 0), 'Brenda': ('test_chars.png', 1), 'Charles': ('test_chars.png', 0), 'Dylan': ('test_chars.png', 2) } image_and_index = CHAR_IMAGES[name] return Character(name, image_and_index[0], image_and_index[1])
def char_factory(name): return librpg.party.Character('Andy', charset_path('naked_man.png'))
def update(self): self.shapeshift += 1 if self.shapeshift > 40: self.image = ObjectImage(charset_path('chest.png'), randint(0, 1), [[0]]) self.shapeshift = 0
def char_factory(name): return Character('Andy', charset_path('naked_man.png'))