Merge branch 'master' of ctpug.org.za:koperkapel
[koperkapel.git] / koperkapel / vehicles / walking.py
index f8198923d921d61f1809b18746fd5833540233aa..9c19aa2264e7f730e0a4ea303b4c7e5310944848 100644 (file)
@@ -2,16 +2,18 @@
 
 import math
 from .base import Vehicle, Seat
-from ..actors.buttons import TextButton
 
 
 class Walking(Vehicle):
 
-    def __init__(self):
+    vehicle_type = "walking"
+
+    def init_seats(self):
         n_seats = 6
         d_theta = 2 * math.pi / n_seats
-        self.seats = [
-            Seat(pos=(math.sin(i * d_theta), math.cos(i * d_theta)))
+        return [
+            Seat(
+                vehicle=self,
+                pos=(math.sin(i * d_theta), math.cos(i * d_theta)))
             for i in range(n_seats)
         ]
-        self.background = TextButton("Walking Background")