本文整理汇总了C++中CCSet::autorelease方法的典型用法代码示例。如果您正苦于以下问题:C++ CCSet::autorelease方法的具体用法?C++ CCSet::autorelease怎么用?C++ CCSet::autorelease使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCSet
的用法示例。
在下文中一共展示了CCSet::autorelease方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cancelAndStoleTouch
void UIScrollLayer::cancelAndStoleTouch(CCTouch* pTouch, CCEvent* pEvent)
{
// Throw Cancel message for everybody in TouchDispatcher.
CCSet* touchSet = new CCSet();
touchSet->addObject(pTouch);
touchSet->autorelease();
CCDirector::sharedDirector()->getTouchDispatcher()->touchesCancelled(touchSet, pEvent);
//< after doing this touch is already removed from all targeted handlers
// Squirrel away the touch
claimTouch(pTouch);
}
示例2: testLoadProducts
void CCStoreScene::testLoadProducts(CCObject* pSender)
{
CCSet* productsId = new CCSet();
productsId->autorelease();
CCNative::createAlert("Waiting", "Retrieving Product Information", NULL);
CCNative::showAlert();
// SET YOUR IAP PRODUCT ID TO HERE
productsId->addObject(newCCString("org.cocos2d-x.games.demo.iap01"));
productsId->addObject(newCCString("org.cocos2d-x.games.demo.iap02"));
productsId->addObject(newCCString("org.cocos2d-x.games.demo.iap03"));
CCStore::sharedStore()->loadProducts(productsId, this);
}
示例3: pauseAllRunningActions
CCSet* CCActionManager::pauseAllRunningActions()
{
CCSet *idsWithActions = new CCSet();
idsWithActions->autorelease();
for (tHashElement *element=m_pTargets; element != NULL; element = (tHashElement *)element->hh.next)
{
if (! element->paused)
{
element->paused = true;
idsWithActions->addObject(element->target);
}
}
return idsWithActions;
}