本文整理汇总了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;
}
示例2: batchNodeWithTexture
CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithTexture(CCTexture2D* tex, unsigned int capacity)
{
CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
batchNode->initWithTexture(tex, capacity);
batchNode->autorelease();
return batchNode;
}
示例3: batchNodeWithTexture
/*
* creation with CCTexture2D
*/
CCSpriteBatchNode* CCSpriteBatchNode::batchNodeWithTexture(cocos2d::CCTexture2D *tex)
{
CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
batchNode->initWithTexture(tex, defaultCapacity);
batchNode->autorelease();
return batchNode;
}
示例4: create
CCSpriteBatchNode* CCSpriteBatchNode::create(const char *fileImage, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
batchNode->initWithFile(fileImage, capacity);
batchNode->autorelease();
return batchNode;
}
示例5: create
CCSpriteBatchNode* CCSpriteBatchNode::create(CCTexture2D* tex, unsigned int capacity/* = kDefaultSpriteBatchCapacity*/)
{
CCSpriteBatchNode *batchNode = new CCSpriteBatchNode();
batchNode->initWithTexture(tex, capacity);
batchNode->autorelease();
return batchNode;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}