auto myNode = Node::create(); //create a new node myNode->setVisible(true); //show the node
auto myNode = Node::create(); //create a new node bool nodeVisible = myNode->isVisible(); //check if the node is visible if (nodeVisible) { //do something if the node is visible }This code creates a new node, then checks whether it is visible or not. If it is visible, the code will execute the code inside the if statement. Package library: Cocos2d-x.