How to make a sprite visible and invisible in Cocos2D ?

By | May 19, 2011

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.
[c]urSprite.visible = 0; [/c]

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.
[c]urSprite.visible = 1; [/c]

🙂

Leave a Reply

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