else:
base.fill((10, 10, 10))
base.blit(overlay, (0, 0))
+ frame = self._vehicle.roach_management_frame()
+ if frame is not None:
+ base.blit(frame, (0, 0))
self.actors.default.add(SurfActor(base))
def _init_seats(self):
""" Vehicle base class. """
vehicle_type = None
+ overlay_frame_no = None
approximate_radius = 200
selected_seat_overlay_color = (255, 0, 0, 255)
self.game_pos = (0, 0)
def roach_management_overlay(self):
- return images.load("vehicles/%s/background" % (self.vehicle_type,))
+ return images.load("vehicles/walking/background")
+
+ def roach_management_frame(self):
+ if self.overlay_frame_no is None:
+ return None
+ return images.load("vehicle_big/%s_%d" % (
+ self.vehicle_type, self.overlay_frame_no))
def init_seats(self):
raise NotImplementedError("Vehicles should specify a list of seats")
def get_avatar(self, world):
frames = [self._avatar_frame(i) for i in range(4)]
- return AnimatedSurfActor(frames)
+ return AnimatedSurfActor(frames, anchor=(0, 0))
class Seat:
self.vehicle_pos = (pos[0] * vrad, pos[1] * vrad)
def actor(self):
- seat = images.load(
- "vehicles/%s/seat" % (self.vehicle.vehicle_type,))
+ seat = images.load("vehicles/walking/seat")
selected_seat = seat.copy()
selected_seat.fill(
self.vehicle.selected_seat_overlay_color, None, BLEND_RGBA_MULT)