示例#1
0
 def __init__(self,
              duration: float,
              relative_path: str,
              offset=(0, 0),
              flippable=(False, False)):
     self.duration = duration
     self.texture = Texture(relative_path, offset, flippable)
示例#2
0
class PS_Prompt(Textured):
    textures = {
        "circle": Texture("prompts/ps_circle.png"),
        "square": Texture("prompts/ps_square.png"),
        "triangle": Texture("prompts/ps_triangle.png"),
        "x": Texture("prompts/ps_x.png"),
        "left_trigger": Texture("prompts/left_trigger.png"),
        "right_trigger": Texture("prompts/right_trigger.png"),
        "left_bumper": Texture("prompts/left_bumper.png"),
        "right_bumper": Texture("prompts/right_bumper.png"),
        "directional": Texture("prompts/directional.png")
    }
示例#3
0
class XBOX_Prompt(Textured):
    textures = {
        "a": Texture("prompts/xbox_a.png"),
        "b": Texture("prompts/xbox_b.png"),
        "x": Texture("prompts/xbox_x.png"),
        "y": Texture("prompts/xbox_y.png"),
        "left_trigger": Texture("prompts/left_trigger.png"),
        "right_trigger": Texture("prompts/right_trigger.png"),
        "left_bumper": Texture("prompts/left_bumper.png"),
        "right_bumper": Texture("prompts/right_bumper.png"),
        "directional": Texture("prompts/directional.png")
    }
示例#4
0
class Frame:
    """Frame class."""
    def __init__(self,
                 duration: float,
                 relative_path: str,
                 offset=(0, 0),
                 flippable=(False, False)):
        self.duration = duration
        self.texture = Texture(relative_path, offset, flippable)

    def on_init(self) -> None:
        """Load texture and fps-friendly duration upon initialization."""
        self.duration = int(self.duration * CONFIG.fps)
        self.texture.on_init()

    def on_render(
        self,
        surface: Surface,
        surface_position: Tuple[int, int],
        flipped=(False, False)) -> None:
        """Render on given surface."""
        self.texture.on_render(surface, surface_position, flipped)
示例#5
0
class Border(Textured):
    textures = {
        "side":
        Texture("floors/borders/side.png", flippable=(True, True)),
        "2sides_parallel":
        Texture("floors/borders/2sides_parallel.png", flippable=(True, True)),
        "2sides_perpendicular":
        Texture("floors/borders/2sides_perpendicular.png",
                flippable=(True, True)),
        "3sides":
        Texture("floors/borders/3sides.png", flippable=(True, True)),
        "4sides":
        Texture("floors/borders/4sides.png", flippable=(True, True)),
        "corner":
        Texture("floors/borders/corner.png", flippable=(True, True))
    }
示例#6
0
class Base(Textured):
    textures = {
        "light"  : Texture("base/light.png"),
        "medium" : Texture("base/medium.png"),
        "dark"   : Texture("base/dark.png")
    }
示例#7
0
class Wall(Textured):
    textures = {
        "corner_0" : Texture("walls/corner_0.png", flippable=(True, False)),
        "corner_1" : Texture("walls/corner_1.png", flippable=(True, False)),
        "horizontal_0" : Texture("walls/horizontal_0.png", flippable=(True, False)),
        "horizontal_1" : Texture("walls/horizontal_1.png", flippable=(True, False)),
        "horizontal_2" : Texture("walls/horizontal_2.png", flippable=(True, False)),
        "horizontal_3" : Texture("walls/horizontal_3.png", flippable=(True, False)),
        "horizontal_4" : Texture("walls/horizontal_4.png", flippable=(True, False)),
        "horizontal_5" : Texture("walls/horizontal_5.png", flippable=(True, False)),
        "horizontal_6" : Texture("walls/horizontal_6.png", flippable=(True, False)),
        "horizontal_7" : Texture("walls/horizontal_7.png", flippable=(True, False)),
        "horizontal_8" : Texture("walls/horizontal_8.png", flippable=(True, False)),
        "horizontal_9" : Texture("walls/horizontal_9.png", flippable=(True, False)),
        "vertical_0" : Texture("walls/vertical_0.png", flippable=(True, False)),
        "vertical_1" : Texture("walls/vertical_1.png", flippable=(True, False))
    }
示例#8
0
class PC_Prompt(Textured):
    textures = {
        "a": Texture("prompts/a.png"),
        "b": Texture("prompts/b.png"),
        "c": Texture("prompts/c.png"),
        "d": Texture("prompts/d.png"),
        "e": Texture("prompts/e.png"),
        "f": Texture("prompts/f.png"),
        "g": Texture("prompts/g.png"),
        "h": Texture("prompts/h.png"),
        "i": Texture("prompts/i.png"),
        "j": Texture("prompts/j.png"),
        "k": Texture("prompts/k.png"),
        "l": Texture("prompts/l.png"),
        "m": Texture("prompts/m.png"),
        "n": Texture("prompts/n.png"),
        "o": Texture("prompts/o.png"),
        "p": Texture("prompts/p.png"),
        "q": Texture("prompts/q.png"),
        "r": Texture("prompts/r.png"),
        "s": Texture("prompts/s.png"),
        "t": Texture("prompts/t.png"),
        "u": Texture("prompts/u.png"),
        "v": Texture("prompts/v.png"),
        "w": Texture("prompts/w.png"),
        "x": Texture("prompts/x.png"),
        "y": Texture("prompts/y.png"),
        "z": Texture("prompts/z.png"),
        "0": Texture("prompts/0.png"),
        "1": Texture("prompts/1.png"),
        "2": Texture("prompts/2.png"),
        "3": Texture("prompts/3.png"),
        "4": Texture("prompts/4.png"),
        "5": Texture("prompts/5.png"),
        "6": Texture("prompts/6.png"),
        "7": Texture("prompts/7.png"),
        "8": Texture("prompts/8.png"),
        "9": Texture("prompts/9.png"),
        "space": Texture("prompts/space.png"),
        "shift": Texture("prompts/shift.png"),
        "caps": Texture("prompts/caps.png"),
        "left_arrow": Texture("prompts/left_arrow.png"),
        "right_arrow": Texture("prompts/right_arrow.png"),
        "up_arrow": Texture("prompts/up_arrow.png"),
        "down_arrow": Texture("prompts/down_arrow.png"),
        "home_windows": Texture("prompts/home_windows.png"),
        "home_mac": Texture("prompts/home_mac.png"),
        "left_click": Texture("prompts/left_click.png"),
        "right_click": Texture("prompts/right_click.png")
    }
示例#9
0
class SmallManaPotion(Textured):
    texture = Texture("items/potions/mana/small.png")
示例#10
0
class GoldenHatch(Textured):
    textures = {
        "closed": Texture("hatches/gold/closed.png"),
        "open": Texture("hatches/gold/open.png", offset=(0, -1))
    }
示例#11
0
class IronHatch(Textured):
    textures = {
        "closed": Texture("hatches/iron/closed.png"),
        "open": Texture("hatches/iron/open.png", offset=(0, -1))
    }
示例#12
0
class GoldenDoubleDoor(Textured):
    textures = {
        "closed": Texture("doors/gold/double/closed.png"),
        "open_up": Texture("doors/gold/double/open_up.png", offset=(0, -1)),
        "open_down": Texture("doors/gold/double/open_down.png")
    }
示例#13
0
class IronSingleDoor(Textured):
    textures = {
        "closed": Texture("doors/iron/single/closed.png"),
        "open_up": Texture("doors/iron/single/open_up.png", offset=(0, -1)),
        "open_down": Texture("doors/iron/single/open_down.png")
    }
示例#14
0
class Crack(Textured):
    textures = {
        "0": Texture("floors/cracks/crack_0.png"),
        "1": Texture("floors/cracks/crack_1.png"),
        "2": Texture("floors/cracks/crack_2.png"),
        "3": Texture("floors/cracks/crack_3.png"),
        "4": Texture("floors/cracks/crack_4.png"),
        "5": Texture("floors/cracks/crack_5.png"),
        "6": Texture("floors/cracks/crack_6.png"),
        "7": Texture("floors/cracks/crack_7.png"),
        "8": Texture("floors/cracks/crack_8.png"),
        "9": Texture("floors/cracks/crack_9.png"),
        "10": Texture("floors/cracks/crack_10.png"),
        "11": Texture("floors/cracks/crack_11.png"),
        "12": Texture("floors/cracks/crack_12.png"),
        "13": Texture("floors/cracks/crack_13.png")
    }
示例#15
0
class BigManaPotion(Textured):
    texture = Texture("items/potions/mana/big.png")
示例#16
0
class IronKey(Textured):
    texture = Texture("items/keys/iron.png")
示例#17
0
class Coin(Textured):
    texture = Texture("items/gold_coin.png")
示例#18
0
class GoldKey(Textured):
    texture = Texture("items/keys/gold.png")
示例#19
0
class BigHealthPotion(Textured):
    texture = Texture("items/potions/health/big.png")
示例#20
0
class SmallHealthPotion(Textured):
    texture = Texture("items/potions/health/small.png")