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.

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 *