CCCallFunc in Cocos2d-x with a sub-class

81 Views Asked by At

I have this CCCallFunc being constructed

CCCallFunc::create(this, callfunc_selector(STLoadingSceneBase::load1))

But what I really need to call is load1(...) on STLoadingSceneSubClass, a subclass of STLoadingSceneBase. My goal is to create one set of CCCallFunc in the super-class and have the callbacks fired in the sub-class.

Is there a way to use callfunc_selector with "this" that I'm missing?

I tried this but it didn't work

CCCallFunc::create(this, callfunc_selector(this::load1))
1

There are 1 best solutions below

1
On

Have you tried callfunc_selector(STLoadingSceneSubClass::load1)?