Esempio n. 1
0
RichElementCustomNode* RichElementCustomNode::create(int tag, const Color3B &color, GLubyte opacity, cocos2d::Node *customNode)
{
    RichElementCustomNode* element = new (std::nothrow) RichElementCustomNode();
    if (element && element->init(tag, color, opacity, customNode))
    {
        element->autorelease();
        return element;
    }
    CC_SAFE_DELETE(element);
    return nullptr;
}
Esempio n. 2
0
RichElementCustomNode* RichElementCustomNode::create(int tag, const ccColor3B &color, GLubyte opacity, cocos2d::CCNode *customNode)
{
    RichElementCustomNode* element = new RichElementCustomNode();
    if (element && element->init(tag, color, opacity, customNode))
    {
        CC_SAFE_AUTORELEASE(element);
        return element;
    }
    CC_SAFE_DELETE(element);
    return NULL;
}