C++ question nonstatic member function call

Hello i am transitioning between 2 scenes and i use the code i found here :


so my update function is properly called after the transition

my code is

   void HelloWorld::onEnter()
    {
    	CCNode::onEnter();
    	this->scheduleUpdate();
    }

My question is how can we call CCNode::onEnter() without creating an object of type CCNode first
shouldn’t CCNode::onEnter be a static function
what feature of c++ is beeeing used here?
Thanks!!! :slight_smile:

For me it looks that HelloWorld is a derivered class from CCNode, thus it’s first calling it’s Base class.

1 Like

i got it
class HelloWorld : public cocos2d::Layer
it inherits from Layer wich inherits from Node