From: Simon Cross Date: Sat, 5 Mar 2016 15:13:58 +0000 (+0200) Subject: Remove some fiddling with pygzero internals. X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=208b0bfa93ce450a3d1e686d0bd0b2c93104f7b8;p=koperkapel.git Remove some fiddling with pygzero internals. --- diff --git a/koperkapel/scenes/roach_management.py b/koperkapel/scenes/roach_management.py index 70af321..77100ab 100644 --- a/koperkapel/scenes/roach_management.py +++ b/koperkapel/scenes/roach_management.py @@ -59,7 +59,7 @@ class RoachesScene(Scene): def _init_bg(self): self.actors.default.clear() - overlay = self._vehicle.roach_management_overlay()._surf + overlay = self._vehicle.roach_management_overlay() base = overlay.copy() if self._level_scene is not None: base.fill((0, 0, 0)) diff --git a/koperkapel/vehicles/base.py b/koperkapel/vehicles/base.py index 551826f..dec2aca 100644 --- a/koperkapel/vehicles/base.py +++ b/koperkapel/vehicles/base.py @@ -3,7 +3,6 @@ import math from itertools import chain, islice, repeat from pygame.constants import BLEND_RGBA_MULT -from pgzero.actor import Actor from pgzero.loaders import images from ..actors.orientatedsurf import OrientatedSurfActor from ..actors.animsurf import AnimatedSurfActor @@ -21,7 +20,7 @@ class Vehicle: self.game_pos = (0, 0) def roach_management_overlay(self): - return Actor("vehicles/%s/background" % (self.vehicle_type,)) + return images.load("vehicles/%s/background" % (self.vehicle_type,)) def init_seats(self): raise NotImplementedError("Vehicles should specify a list of seats")