Пример #1
0
ComRender* ComRender::create(cocos2d::Node *node, const char *comName)
{
    ComRender * ret = new (std::nothrow) ComRender(node, comName);
    if (ret != nullptr && ret->init())
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
        return ret;
}
Пример #2
0
ComRender* ComRender::create(void)
{
    ComRender * ret = new (std::nothrow) ComRender();
    if (ret != nullptr && ret->init())
    {
        ret->autorelease();
    }
    else
    {
        CC_SAFE_DELETE(ret);
    }
	return ret;
}