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

        self.sprite = resman.get("game.axe_sprite").clone()
        # FIXME: make it pingpong instead of loop
        self.animTimer = PingPongTimer(25, 0, 8)
Esempio n. 2
0
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.axe_sprite").clone()
        # FIXME: make it pingpong instead of loop
        self.animTimer = PingPongTimer(25, 0, 8)
Esempio n. 3
0
class AxeView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.axe_sprite").clone()
        # FIXME: make it pingpong instead of loop
        self.animTimer = PingPongTimer(25, 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))
Esempio n. 4
0
class AxeView(PickupView):
    def __init__(self, model):
        PickupView.__init__(self)
        self.model = model

        self.sprite = resman.get("game.axe_sprite").clone()
        # FIXME: make it pingpong instead of loop
        self.animTimer = PingPongTimer(25, 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))