Another seemingly interesting change is to callbacks. Previously, relied on ugly macros and weird syntax to pass a callback method to an instance:
FiniteTimeAction* callback = CCCallFuncO::create(
this,
callfuncO_selector(
KDContentLayer::_switchLayer
),
screenLayer
);
However, they now migrated to one of the new awesome features of C++11, which is std::bind
.
FiniteTimeAction* callback = CallFuncN::create(
std::bind(&KDContentLayer::_switchLayer, this, screenLayer)
);