def __init__(self): self.current_direction = 0 self.current_frame = 0 self.frames = [[ texture_asset.TextureAsset("crucible{}.png".format(i)) for i in range(0, 4) ]]
def make_flag_ru(pos): animation = [ texture_asset.TextureAsset("RU_Rendered/out{:04d}.png".format(i)) for i in range(0, 50, 2) ] entext = EntityTexture(*([animation] * 4)) return Flag(pos, entext)
def load_walking_texture(entity_name, frames=[0, 1, 0, 2]): direction_animations = [ [ texture_asset.TextureAsset("human{}{}{}.png".format(entity_name, direction, i)) for i in frames ] for direction in ["Front", "Left", "Back", "Right"] ] return EntityTexture(*direction_animations)
def make_rock(pos, size=0): animation = [ texture_asset.TextureAsset("rock{}.png".format(i)) for i in range(10) ] entext = EntityTexture(*([animation] * 4)) rock = Rock(pos, entext) rock.size_frame = size rock.mass = (size + 1) * 5 return rock
def make_sledgehammer(pos): animation = [texture_asset.TextureAsset("sledgehammer.png")] entext = EntityTexture(*([animation] * 4)) return SledgeHammer(pos, entext)
def make_shovel(pos): animation = [texture_asset.TextureAsset("shovel.png")] entext = EntityTexture(*([animation] * 4)) return Shovel(pos, entext)
def make_spoon(pos): animation = [texture_asset.TextureAsset("spoon.png")] entext = EntityTexture(*([animation] * 4)) return Spoon(pos, entext)