Hi! I'm trying to subclass sprite, because I think I need to do so in order to get some custom animations. I want a sprite that looks different depending on the direction it moves, and again different when it does not move at all.
My problem is that I cant get my Subclass to be displayed at all. At the moment I have stripped it down to this http://gist.github.com/103180 class AnimatedSprite(cocos.sprite.Sprite, cocos.batch.BatchNode): def __init__(self, image, position=(0,0), rotation=0, scale=1, opacity=255, color=(255,255,255), anchor=None, stillImage=None): super(AnimatedSprite,self).__init__(image, position, rotation, scale, opacity, color, anchor) cocos.batch.BatchNode.__init__(self) #self.image = image self.stillImage = stillImage def draw(): cocos.sprite.Sprite.draw() But when I create one of these AnimatedSprites and add it do a scene, they do not get displayed, no matter what I try. What am I doing wrong? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "cocos2d discuss" 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/cocos-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
