On 04/06/2009, at 11:01 PM, Steve Johnson wrote:
>> class Player(GameObject):
>>    fps = behavior.FPS(
>>       keys=dict(left=key.A, right=key.D, forward=key.W,
>> backward=key.S),
>>    )
>>
>> where behavior.FPS is something appropriate and then scrape the class
>> for special attributes in the GameObject.__init__
>
> But wouldn't fps then be a static attribute? What if different players
> need different sets of keys?

OK, I'll re-word my explanation a little. You scrape the class for  
special attributes and create instance attributes in  
GameObject.__init__.


      Richard


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to