X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=koperkapel%2Fvehicles%2Fwalking.py;h=91cf02df66372b8f33c22771fd43a7dfd4ad6006;hb=2c4c2428ac247ea8fdac2aaf6b2373fbf0275e3c;hp=f8198923d921d61f1809b18746fd5833540233aa;hpb=6c6ebfbe8d8cbd476c94a5030bc1ab9e7d858f6d;p=koperkapel.git diff --git a/koperkapel/vehicles/walking.py b/koperkapel/vehicles/walking.py index f819892..91cf02d 100644 --- a/koperkapel/vehicles/walking.py +++ b/koperkapel/vehicles/walking.py @@ -1,17 +1,20 @@ """ A vehicle to represent roaches on foot. """ import math +from pgzero.actor import Actor 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")