On Jul 19, 10:24 am, Zheban <[email protected]> wrote: > I'm new to using Pyglet, so I'd also appreciate some hands- > on advice as well if my implementation could be better. > > arena.py > --------------------------------------------- > from pyglet import image > from pyglet.graphics import Batch > from pyglet.sprite import Sprite > class Arena():
[snip arena class] > arena = Arena() > --------------------------------------------- > > main.py > --------------------------------------------- > from pyglet.app import run > from pyglet.window import Window > from arena import arena > window = Window(width = 252, height = 252, caption = 'MMBNOnline') > panels = arena.set_panels() > @window.event > def on_draw(): > window.clear() > panels.draw() > run() I'm not sure if you're posting all of your code here, but are you really getting an instance of Arena by declaring arena = Arena() in the arena.py file and not in the main.py file? Try creating the instance in your main.py instead, like arena = arena.Arena() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
