cocos2dx 3.0创建回调函数

来源:互联网 发布:linux安装邮件服务器 编辑:程序博客网 时间:2024/04/27 22:55

1、当回调函数有一个参数时:

auto fun = CallFuncN::create(std::bind(&类名::回调函数名字, this, std::placeholders::_1));

例子:CallFuncN::create(std::bind(&SpriteFrameAnimation::onRemove, this, std::placeholders::_1));


0 0
原创粉丝点击