Exemplo n.º 1
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.copper_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, self.sprite.max_x)
        self.animTimer.set_frame(0, random.randint(0, self.sprite.max_x - 1))
Exemplo n.º 2
0
class CopperCoinView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.copper_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, self.sprite.max_x)
        self.animTimer.set_frame(0, random.randint(0, self.sprite.max_x - 1))

    def draw(self, frame):
        if self.get_pos(frame) is not None:
            self.sprite.nr = self.animTimer.get_frame(frame.time_sec)
            self.sprite.draw(frame.surface, self.get_pos(frame) + Vec2D(frame.X_OFFSET, frame.Y_OFFSET))
Exemplo n.º 3
0
class CopperCoinView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.copper_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, self.sprite.max_x)
        self.animTimer.set_frame(0, random.randint(0, self.sprite.max_x - 1))

    def draw(self, frame):
        if self.get_pos(frame) is not None:
            self.sprite.nr = self.animTimer.get_frame(frame.time_sec)
            self.sprite.draw(
                frame.surface,
                self.get_pos(frame) + Vec2D(frame.X_OFFSET, frame.Y_OFFSET))
Exemplo n.º 4
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.copper_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, self.sprite.max_x)
        self.animTimer.set_frame(0, random.randint(0, self.sprite.max_x - 1))
Exemplo n.º 5
0
class MirrorView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.mirror_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, 9)

    def draw(self, frame):
        if self.get_pos(frame) is not None:
            self.sprite.nr = self.animTimer.get_frame(frame.time_sec)
            self.sprite.draw(frame.surface, self.get_pos(frame) + Vec2D(frame.X_OFFSET, frame.Y_OFFSET - 10))
Exemplo n.º 6
0
class FlagView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.flag%d_sprite" % (model.goldcar.nr + 1))
        self.animTimer = LoopAnimationTimer(20, 0, 8)

    def draw(self, frame):
        if self.get_pos(frame) is not None:
            self.sprite.nr = self.animTimer.get_frame(frame.time_sec)
            self.sprite.draw(frame.surface, self.get_pos(frame) + Vec2D(frame.X_OFFSET, frame.Y_OFFSET - 20))
Exemplo n.º 7
0
class DiamondView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.diamond_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, 4)

    def draw(self, frame):
        if self.get_pos(frame) is not None:
            self.sprite.nr = self.animTimer.get_frame(frame.time_sec)
            self.sprite.draw(
                frame.surface,
                self.get_pos(frame) + Vec2D(frame.X_OFFSET, frame.Y_OFFSET))
Exemplo n.º 8
0
class FlagView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.flag%d_sprite" % (model.goldcar.nr + 1))
        self.animTimer = LoopAnimationTimer(20, 0, 8)

    def draw(self, frame):
        if self.get_pos(frame) is not None:
            self.sprite.nr = self.animTimer.get_frame(frame.time_sec)
            self.sprite.draw(
                frame.surface,
                self.get_pos(frame) +
                Vec2D(frame.X_OFFSET, frame.Y_OFFSET - 20))
Exemplo n.º 9
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.mirror_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, 9)
Exemplo n.º 10
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.flag%d_sprite" % (model.goldcar.nr + 1))
        self.animTimer = LoopAnimationTimer(20, 0, 8)
Exemplo n.º 11
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.mirror_sprite").clone()
        self.animTimer = LoopAnimationTimer(25, 0, 9)
Exemplo n.º 12
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.key_sprite")
        self.animTimer = LoopAnimationTimer(25, 0, 19)
Exemplo n.º 13
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.flag%d_sprite" % (model.goldcar.nr + 1))
        self.animTimer = LoopAnimationTimer(20, 0, 8)