On Fri, Oct 18, 2013 at 2:36 PM, Eamonn Rea <[email protected]> wrote:
> Thanks a bunch :-D I' m new to Cocos and PyGlet, and I'm getting used to
> the transition between them and PyGame.
>
> I just have 1 more problem: How do I stop certain images from drawing? I
> can't find anything anywhere. I mean, I want my left sprite sheet to draw
> when facing left and my right one to draw when I'm facing left. I know how
> to do the facing thing, but not how to stop drawing one of them. Is there a
> self.remove()?
> --
>
You can hide a node by doing
node.visible = False
Anyway, having a sprite for playerleft and other for player right don't
feels good; the usual thing is to have one sprite and some methods to deal
with animations, like
def start_animation(self, anim_name):
...
def update_animation(self, dt):
Those methods will care to put the appropiate image in the sprite.
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" 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/cocos-discuss.
For more options, visit https://groups.google.com/groups/opt_out.