Quantcast
Channel: Cocos Forums - Latest topics
Viewing all articles
Browse latest Browse all 17117

Lambda function for setLastFrameCallFunc Not working on android

$
0
0

@padmnabh wrote:

Hi,
It's strange that setLastFrameCallFunc is working fine for me on iOS with capture by value my class variable but it's giving some garbage value on Android compile. I am not sure what type of issue exactly it is but if anyone familiar with this then let me know.

CCLOG("Balance val in class %d", Balance);
selectAnimation->setLastFrameCallFunc(={
selectAnimation->clearLastFrameCallFunc();
CCLOG("balance Val in lambda %d", Balance);
});

Here Balance is class int variable and selectAnimation is cocostudio::timeline::ActionTimeline*
Where Balance outside is proper but inner one could be anything from -123456 to 0 to 123456

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 17117

Trending Articles