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)
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))
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))