void  CCDragonBones::addEventListener(const String &type, const String &key, cocos2d::CCObject*pObj, SEL_CallFuncND callback)
    {
        m_Caller = pObj;
        m_Callback = callback;
//        EventDispatcher::Function f = &CCDragonBones::eventBridge;
//        Function f = std::bind(&CCDragonBones::eventBridge, this, std::placeholders::_1);
        m_Armature->addEventListener(type, this, function_selector(CCDragonBones::eventBridge), key);
    }
Esempio n. 2
0
af::shared<int>
di::SpotFilterAgent::filter(spot_list_t masterlist,
                            af::shared<int> parentselection,
                            std::string test){
  af::shared<int>z; z.reserve(parentselection.size());

  funcptr function = function_selector(test);

  for (int x=0; x<parentselection.size(); ++x){
    if (function(masterlist[parentselection[x]],this)) {
      z.push_back(parentselection[x]);
    }
  }
  return z;
}