Skip to content

Instantly share code, notes, and snippets.

@orlp
Created November 19, 2011 20:39
Show Gist options
  • Select an option

  • Save orlp/1379323 to your computer and use it in GitHub Desktop.

Select an option

Save orlp/1379323 to your computer and use it in GitHub Desktop.
from __future__ import division, print_function
import pyglet
from pyglet.gl import *
import function
class Map(object):
def __init__(self, game, mapname):
self.mapname = mapname
self.image = pyglet.sprite.Sprite(function.load_image("maps/" + mapname))
self.image.scale = 6
def draw(self, game):
self.image.x = -game.xview
self.image.y = -game.yview
self.image.draw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment