예제 #1
0
 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)
     ]]
예제 #2
0
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)
예제 #3
0
 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)
예제 #4
0
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
예제 #5
0
def make_sledgehammer(pos):
    animation = [texture_asset.TextureAsset("sledgehammer.png")]
    entext = EntityTexture(*([animation] * 4))

    return SledgeHammer(pos, entext)
예제 #6
0
def make_shovel(pos):
    animation = [texture_asset.TextureAsset("shovel.png")]
    entext = EntityTexture(*([animation] * 4))

    return Shovel(pos, entext)
예제 #7
0
def make_spoon(pos):
    animation = [texture_asset.TextureAsset("spoon.png")]
    entext = EntityTexture(*([animation] * 4))

    return Spoon(pos, entext)