+ self._image = None
+
+ def get_image(self):
+ if self._image is None:
+ self._image = pygame.surface.Surface(SCREEN_SIZE).convert_alpha()
+ self._image.fill((0,0,0,0))
+
+ for shape in self.shapes:
+ pygame_poly = [
+ pymunk.pygame_util.to_pygame(v, self._image) for v in
+ shape.get_vertices()]
+ pygame.draw.polygon(self._image, (255, 255, 255), pygame_poly)
+
+ wall_texture = loader.load_image("textures", "stone.png").convert_alpha()
+ self._image.blit(wall_texture, (0, 0), None, pgl.BLEND_RGBA_MULT)
+
+ return self._image