In Cocos2d, I was able to do this:
id easek = [CCEaseSineInOut actionWithAction:[CCMoveTo actionWithDuration:0.1 position:ccp(target.x, target.y - kKeyPressOffset)]];
id spawnk = [CCSpawn actions:easek, scalek, nil];
id endblock = [CCCallBlock actionWithBlock:^
{
[self updateCurrentPositionFromActual];
z = initial_z;
[self.parent reorderChild:self z:z + kKeyCapHeight + 2];
[spriteShadow.parent reorderChild:spriteShadow z:z + kKeyBaseLine];
}];
[self runAction:[CCSequence actions: spawnk, endblock, nil]];
How would I achieve the same effect in cocos2d-x using lambda expressions instead of the CCCallBlock?
Note, I’ve got cocos2d-x compiling in Xcode for C++11 no problem.