X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=koperkapel%2Fvehicles%2Fbase.py;h=09090048d5991b449f7a8f2a7c6a0599ae0dbac1;hb=0f2d2e9c4d31d58d0c0cfe1eb7327ce430a61dbd;hp=27373a5f1eb881c658b2f00021d4e21e5482e65e;hpb=a3a4e8d31e4e44d4f245b4c2de9d32b37a530c5c;p=koperkapel.git diff --git a/koperkapel/vehicles/base.py b/koperkapel/vehicles/base.py index 27373a5..0909004 100644 --- a/koperkapel/vehicles/base.py +++ b/koperkapel/vehicles/base.py @@ -1,13 +1,15 @@ """ Base class for vehicles. """ +from pgzero.actor import Actor + class Vehicle: """ Vehicle base class. A vehicle should have the following attributes: - * seats -- list of roach seats. * background -- actor representing background for management scene + * seats -- list of roach seats. """ vehicle_types = {} @@ -30,6 +32,7 @@ class Vehicle: class Seat: """ A space in a vehicle for a roach. + * background -- actor representing the seat. * pos -- (x, y) position of the seat relative to the centre of the vehicle. x and y may be numbers from approximately -1.0 to 1.0. They will be multiplied by the approximate_radius of the vehicle. @@ -37,7 +40,8 @@ class Seat: seat """ - def __init__(self, pos, allowed=None): + def __init__(self, actor, pos, allowed=None): + self.actor = actor self.pos = pos self.allowed = allowed or (lambda roach: True)