But cocos2d-x 2.2 doesn't support `std::function`which is a c++11 feature.