当前位置: 首页>>代码示例>>C++>>正文


C++ CCSpriteBatchNode::autorelease方法代码示例

本文整理汇总了C++中CCSpriteBatchNode::autorelease方法的典型用法代码示例。如果您正苦于以下问题:C++ CCSpriteBatchNode::autorelease方法的具体用法?C++ CCSpriteBatchNode::autorelease怎么用?C++ CCSpriteBatchNode::autorelease使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCSpriteBatchNode的用法示例。


在下文中一共展示了CCSpriteBatchNode::autorelease方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: batchNodeWithFile

	CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithFile(const char *fileImage)
	{
		CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
		batchNode->initWithFile(fileImage, defaultCapacity);
		batchNode->autorelease();

		return batchNode;
	}
开发者ID:ChristianFischer,项目名称:cocos2d-x,代码行数:8,代码来源:CCSpriteBatchNode.cpp

示例2: batchNodeWithTexture

	CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity)
	{
		CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
		batchNode->initWithTexture(tex, capacity);
		batchNode->autorelease();

		return batchNode;
	}
开发者ID:ChristianFischer,项目名称:cocos2d-x,代码行数:8,代码来源:CCSpriteBatchNode.cpp

示例3: batchNodeWithTexture

	/*
	* creation with CCTexture2D
	*/
	CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithTexture(cocos2d::CCTexture2D *tex)
	{
		CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
		batchNode->initWithTexture(tex, defaultCapacity);
		batchNode->autorelease();

		return batchNode;
	}
开发者ID:valentinvit,项目名称:cocos2d-x,代码行数:11,代码来源:CCSpriteBatchNode.cpp

示例4: create

CCSpriteBatchNode* CCSpriteBatchNode::create(const char *fileImage, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
    CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
    batchNode->initWithFile(fileImage, capacity);
    batchNode->autorelease();

    return batchNode;
}
开发者ID:DionysosLai,项目名称:Coco2d-xRes,代码行数:8,代码来源:CCSpriteBatchNode.cpp

示例5: create

CCSpriteBatchNode* CCSpriteBatchNode::create(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
    CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
    batchNode->initWithTexture(tex, capacity);
    batchNode->autorelease();

    return batchNode;
}
开发者ID:csdnnet,项目名称:hiygame,代码行数:8,代码来源:CCSpriteBatchNode.cpp

示例6: createWithTexture

NS_CC_BEGIN

/*
* creation with CCTexture2D
*/
// 用纹理创建

CCSpriteBatchNode* CCSpriteBatchNode::createWithTexture(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
    CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
    batchNode->initWithTexture(tex, capacity);
    batchNode->autorelease();

    return batchNode;
}
开发者ID:erduo,项目名称:cocos2d-x,代码行数:15,代码来源:CCSpriteBatchNode.cpp

示例7: create

CCSpriteBatchNode* CCSpriteBatchNode::create ( const KDchar* szFilePath, KDuint uCapacity )
{
	CCSpriteBatchNode*  pRet = new CCSpriteBatchNode ( );
    
    if ( pRet && pRet->initWithFile ( szFilePath, uCapacity ) )
    {
        pRet->autorelease ( );
    }
    else
    {
        CC_SAFE_DELETE ( pRet );
    }

	return pRet;
}
开发者ID:mcodegeeks,项目名称:OpenKODE-Framework,代码行数:15,代码来源:CCSpriteBatchNode.cpp

示例8: createWithTexture

NS_CC_BEGIN

/*
* creation with CCTexture2D
*/
//静态函数:通过纹理指针按照设定的图块数量创建一个CCSpriteBatch实例对象。
CCSpriteBatchNode* CCSpriteBatchNode::createWithTexture(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
	//使用new创建一个CCSpriteBatchNode实例对象。
    CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
	//使用纹理指针和默认图块数量对CCSpriteBatchNode实例对象进行初始化。
    batchNode->initWithTexture(tex, capacity);
	//设置其由内存管理器进行内存释放。
    batchNode->autorelease();
	//返回新创建的CCSpriteBatchNode实例对象  
    return batchNode;
}
开发者ID:DionysosLai,项目名称:Coco2d-xRes,代码行数:17,代码来源:CCSpriteBatchNode.cpp

示例9: createWithTexture

NS_CC_BEGIN

//
// creation with CCTexture2D
//

CCSpriteBatchNode* CCSpriteBatchNode::createWithTexture ( CCTexture2D* pTexture, KDuint uCapacity )
{
	CCSpriteBatchNode*  pRet = new CCSpriteBatchNode ( );

    if ( pRet && pRet->initWithTexture ( pTexture, uCapacity ) )
    {
        pRet->autorelease ( );
    }
    else
    {
        CC_SAFE_DELETE ( pRet );
    }

	return pRet;
}
开发者ID:mcodegeeks,项目名称:OpenKODE-Framework,代码行数:21,代码来源:CCSpriteBatchNode.cpp


注:本文中的CCSpriteBatchNode::autorelease方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。