Remove some fiddling with pygzero internals.
authorSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 15:13:58 +0000 (17:13 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 5 Mar 2016 15:13:58 +0000 (17:13 +0200)
koperkapel/scenes/roach_management.py
koperkapel/vehicles/base.py

index 70af321ab4841b9fe3dc4af3a46db9c95d076937..77100ab7435290d03f7c77d10e45aac171339427 100644 (file)
@@ -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))
index 551826f5053dee9d56c8fd489af54db8abd218f3..dec2aca44e3d2ea2b87c17a5d594ad1a171944a5 100644 (file)
@@ -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")