Skip to content

Instantly share code, notes, and snippets.

from __future__ import division
from random import uniform
from pyglet import clock, font, image, window
from pyglet.gl import *
class Entity(object):
def __init__(self, id, size, x, y, rot):
self.id = id
# This doesn't really do anything outside of post a text label at the
# lower left hand corner of #the screen right now.
from pyglet import window, font
class as_pyglet_text(object):
""" Decorator class
Modifies a function that returns a value (or tuple of values,)
to output to a pyglet window via a font.Text object.