Hello,
here is my code
#include "HelloWorldScene.h"
USING_NS_CC;
Scene* HelloWorld::createScene()
{
auto scene = HelloWorld::create();
return scene;
}
void HelloWorld::myMethodA(int value)
{
CCLOG("%i", value);
}
void HelloWorld::myMethodB()
{
CCLOG("Helloooo");
}
bool HelloWorld::init()
{
if ( !Scene::init() )
return false;
auto someLambdaFunc = CallFunc::create( [=] () {
CCLOG("Byeeee");
}
);
// Loading section 2
auto scheduler = Director::getInstance()->getScheduler();
scheduler->schedule([=] (float dt) {
myMethodA(5);
myMethodB();
someLambdaFunc;
}, this, 0, 0, 5, false, "someName");
return true;
}
The result is ok for all methods execpt the lambda. So the outup prints 5 from myMethodA() and "Hellooo"
from myMethodB, but not "Byeee" is printed out, which is what someLambdaFunc does.
What Am I missing here?
thanks,
R