Exemplo n.º 1
0
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);
    }
}
Exemplo n.º 3
0
bool TFBatchNodeObject::init()
{
    setBatchNode(TEXTURE_CACHE->createSpriteBatchNode(getBatchNodeName()));
    if (NULL == getBatchNode())
    {
        return false;
    }
    
    return true;
}
Exemplo n.º 4
0
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);
    }
}