It should/might (I'm not sure about the details of using sprites in pyglet) but usually you'd have all the animations in a single spritesheet, where you'd then specify the frame ranges (in a traditional use of sprites in any case. I'm not sure about pyglet).
Also: Please reply to [email protected] rather than directly to me. On 19 November 2012 21:43, Cloud Strife <[email protected]> wrote: > > > Anonymouse wrote: > > You probably want to have all the frames in only one image, then adjust > the > > ranges as needed. > > > > > > On 18 November 2012 10:32, Cloud Strife <[email protected]> wrote: > > > > > I'm creating a fighting game using pyglet, i have two animations: > > > breathing_set.png, punch_set.png > > > the first image is for when the character is idle, i need a way so > > > that once the punch is finished, the characters image should return to > > > breathing_set.png > > > > > > -- > > > 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. > > > > > > > i already know how to create an animation from a tileset or spriteset > and seting looping to true or false, what i need is how to change the > image once the punch is finished, my idea is: > class Player(pyglet.sprite.Sprite): > def on_animation_end(self): > if self.image = self.punch_anim: > self.image = self.idle_anim > > will that work? > -- 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.
