Hi,
I’m porting from iOS and have a following inheritance:
class CABPageContent : public CCLayer ... class Page1_Layer : public CABPageContent
I expect that
virtual void tick(float dt);
should be called, but that’s not the case. Any ideas why?
Hi,
I’m porting from iOS and have a following inheritance:
class CABPageContent : public CCLayer ... class Page1_Layer : public CABPageContent
I expect that
virtual void tick(float dt);
should be called, but that’s not the case. Any ideas why?
Did you override tick()?
yes, I do override it
Where do you schedule the function call?
Page1_Layer init()?
Nowhere explicitly - I assume cocos takes over this task, I only call CCLayer::init() in my class init().
All examples I have seen explicitly set the update/tick.
this~~>schedule, 1.0f/60.f);
Or
this~~>scheduleUpdate(); //assuming your function matches the expected format i.e. void ClassName::update(float dt)