Merge branch 'master' of ctpug.org.za:koperkapel
[koperkapel.git] / koperkapel / vehicles / walking.py
index adcdfc931f87b276e7d3be3e79ad54069076ad52..9c19aa2264e7f730e0a4ea303b4c7e5310944848 100644 (file)
@@ -1,19 +1,19 @@
 """ A vehicle to represent roaches on foot. """
 
 import math
-from pgzero.actor import Actor
 from .base import Vehicle, Seat
 
 
 class Walking(Vehicle):
 
-    def __init__(self):
-        self.background = Actor("vehicles/walking/background")
+    vehicle_type = "walking"
+
+    def init_seats(self):
         n_seats = 6
         d_theta = 2 * math.pi / n_seats
-        self.seats = [
+        return [
             Seat(
-                actor=Actor("vehicles/walking/seat"),
+                vehicle=self,
                 pos=(math.sin(i * d_theta), math.cos(i * d_theta)))
             for i in range(n_seats)
         ]