Home > other >  Cocos2dx timer callback function how to use the lambda expressions?
Cocos2dx timer callback function how to use the lambda expressions?

Time:09-22

Because the callback function code is very simple, just one or two lines of code, just don't want to write a member function,
I like to write complains:
This - & gt; ScheduleOnce ([& amp;] Float (dt) {
CCLOG (" performed ");
}, 2.0 f);

Consult everybody,

CodePudding user response:

Behind the less a const STD: : string parameter of type
This - & gt; ScheduleOnce (const STD: : function
  • Related