def __init__(self): ''' Constructor ''' # TODO: Replace redraw with an event? Better parallelism? self.__redraw = True # TODO: REMOVE HARD-CODED DIMENSIONS? self.__window = Window(WINX, WINY) self.__viewport = Viewport(WINX, WINY) self.__objects = list() self.__timer = Stopwatch() self.__lastFrameTime = 0.0 self._modifiers = list() Events.RegisterEvent("REDRAW", self.Redraw)
def RegisterEvents(self): Events.RegisterEvent("KEYPRESS", self.ReceiveKeyPress)