예제 #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)
예제 #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)
예제 #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))
예제 #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))