From 208b0bfa93ce450a3d1e686d0bd0b2c93104f7b8 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 5 Mar 2016 17:13:58 +0200 Subject: [PATCH] Remove some fiddling with pygzero internals. --- koperkapel/scenes/roach_management.py | 2 +- koperkapel/vehicles/base.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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") -- 2.34.1