void TFBatchNodeObject::clearAllBatchNode() { if (getBatchNode()) { getBatchNode()->removeFromParentAndCleanup(true); } setBatchNode(NULL); }
void BatchNodeManager::setBatchNodeZOrder(std::string _name, int _zOrder) { CCSpriteBatchNode *_batchNode = getBatchNode(_name); if(_batchNode != NULL) { _batchNode->_setZOrder(_zOrder); } }
bool TFBatchNodeObject::init() { setBatchNode(TEXTURE_CACHE->createSpriteBatchNode(getBatchNodeName())); if (NULL == getBatchNode()) { return false; } return true; }
bool TFBatchNodeObject::attachBatchNodeToParent(CCNode* parent, int zOrder, int tag) { if (NULL == parent) { __CCLOGWITHFUNCTION("parent can't be NULL"); return false; } parent->addChild(getBatchNode(), zOrder, tag); return true; }
void BatchNodeManager::setBatchNodeBlendFunc(std::string _name, unsigned int _src, unsigned int _dst) { CCSpriteBatchNode *_batchNode = getBatchNode(_name); if(_batchNode != NULL) { ccBlendFunc blendFunc; blendFunc.src = _src; blendFunc.dst = _dst; _batchNode->setBlendFunc(blendFunc); } }