Pass through extra arguments to AnimatedSurfActor.
authorSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 15:34:54 +0000 (17:34 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 15:34:54 +0000 (17:34 +0200)
koperkapel/actors/animsurf.py

index fb9e73ae588fee161f5ba5ad411be6d3d7301cb9..24567b8335eceb95e158c4eb79026f58f982ca5a 100644 (file)
@@ -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