因為回呼函式的代碼很簡單,就一兩行代碼。就不想再寫個成員函式了。
我這樣寫會報錯:
this->scheduleOnce([&](float dt){
CCLOG("執行了");
}, 2.0f);
請教各位。
uj5u.com熱心網友回復:
后面少傳了一個const std::string型別的引數this->scheduleOnce(const std::function<void (float)> &callback, float delay, const std::string &key)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/64389.html
標籤:Cocos2d-x
上一篇:使用D2D繪制圖片的問題
下一篇:求一個下面lua 代碼應用實體
