Component look up – C++

Hi, I’ve attached a component I created to some nodes in a scene like this

class SomeComponent : public cocos2d::Component {
  SomeComponent() {
    setName(__func__); // sets name to SomeComponent 

auto component = new SomeComponent();

the problem here is how do i search and get pointers to those nodes that have that component in a scene?

Source link

More To Explore

Friendships and women’s liberation

Friendships are the foundations of feminist progress. When bullied at work, mistreated by boyfriends, or unsupported at home, a woman turns to her friends. They

Share on facebook
Share on twitter
Share on linkedin
Share on email