Did I find the right examples for you? yes no

All Samples(13)  |  Call(5)  |  Derive(0)  |  Import(8)

src/s/p/Space-Train-HEAD/engine/environment.py   Space-Train(Download)
            this_y = 0
            for y in range(self.background_tile_rows):
                img = util.load_image(util.respath('environments', 
                                                         name, 
                                                         '%d_%d.png' % (x, y)))
                overlay_tile_path = util.respath('environments', name, 'overlay_%d_%d.png' % (x, y))
                try:
                    img = util.load_image(overlay_tile_path)
                    new_sprite = pyglet.sprite.Sprite(img, x=x*tile_w, y=y*tile_h,
                                                      batch=self.overlay_batch)
        self.draw = self.background_batch.draw
        self.draw_overlay = self.overlay_batch.draw
        self.behind = util.load_image('environments/spacebackground.png')
 
    def exit(self):

src/s/p/Space-Train-HEAD/engine/scenehandler.py   Space-Train(Download)
 
        # Build transition sprite(s)
        scene_transition_img = util.load_image(util.respath('environments', 'transitions', 'test.png'))
        self.sprite = pyglet.sprite.Sprite(scene_transition_img, x = 0, y = 0, batch=self.batch)
        self.sprite.opacity = 0

src/s/p/Space-Train-HEAD/engine/actor.py   Space-Train(Download)
    def image_named(self, img_name, anchor_x, anchor_y):
        """Load and anchor a PNG"""
        img = util.load_image(self.resource_path("%s.png" % img_name))
        img.anchor_x = img.width * anchor_x
        img.anchor_y = img.height * anchor_y