On Jan 2, 6:29 am, Dummey <[email protected]> wrote: > I am currently trying to create a character that can face left/right > and while facing in these directions walk/jump. A basic side scrolling > character. > > Now my question is, how should I build my character class? My original > thought was to extend the sprite class and just alter the image that > is inside that sprite to the one that I need. While this seems to work > for still images, animations do not run. Is there a convention on how > I should be approaching this? An example would also be great, most of > the games that I have been studying only end up using rotate.
Hey there, I don't know much about much, but for the record, you shouldn't need to extend the sprite class to change the image that is displayed. Just re-assign to the sprite.image attribute as and when you need a different image displayed. I use this for left/right facing images, but presumably you could entirely manage manual animation this way - but the logic is outside the (unmodified) Sprite class, in your own code. -- 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.
