How to make a sprite visible and invisible in Cocos2D ?

Hi,

In order to make a sprite completely invisible , use the following code while using Cocos2D, this code will set the visibility of your sprite to zero.

urSprite.visible = 0; 

In order to make a sprite completely visible, use the following code while using Cocos2D, this code will set the visibility of the sprite back to one.

urSprite.visible = 1; 

:)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>