From: Simon Cross Date: Sat, 5 Mar 2016 15:34:54 +0000 (+0200) Subject: Pass through extra arguments to AnimatedSurfActor. X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=74c2f07b68003143a548621668684cf485d77d84;p=koperkapel.git Pass through extra arguments to AnimatedSurfActor. --- diff --git a/koperkapel/actors/animsurf.py b/koperkapel/actors/animsurf.py index fb9e73a..24567b8 100644 --- a/koperkapel/actors/animsurf.py +++ b/koperkapel/actors/animsurf.py @@ -6,13 +6,13 @@ from .orientatedsurf import OrientatedSurfActor class AnimatedSurfActor(OrientatedSurfActor): - def __init__(self, frames, cycle_dt=0.2): + def __init__(self, frames, cycle_dt=0.2, **kw): self._frames = frames self._frame = random.randint(0, len(frames) - 1) self._dt = 0 self._cycle_dt = cycle_dt each_tick(self.update) - super().__init__(surf=frames[self._frame], angle=0) + super().__init__(surf=frames[self._frame], **kw) def update(self, dt): self._dt += dt