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?
>>
>
>
Yes, that will work. You can change the image / animation of a Sprite by 
setting the "sprite.image" variable. Pyglet will also reset the new 
animation when you do that. 

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to