Hi,
In certain situations you may need to make visible or invisible certain sprites. But how to set a sprite visible and invisible in Cocos2D? See the following Cocos2D code.

//Set the sprite's visible value to 1 to make it visible
yourSprite.visible = 1;
//Set the sprite's visible value to 0 to make it invisible
yourSprite.visible = 0;

🙂

 

Leave a Reply

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

 

 

 

Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.