您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CC_SAFE_RETAIN函数代码示例

51自学网 2021-06-01 19:57:49
  C++
这篇教程C++ CC_SAFE_RETAIN函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CC_SAFE_RETAIN函数的典型用法代码示例。如果您正苦于以下问题:C++ CC_SAFE_RETAIN函数的具体用法?C++ CC_SAFE_RETAIN怎么用?C++ CC_SAFE_RETAIN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

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

示例1: CC_SAFE_RETAIN

// XXX deprecatedbool MenuItem::initWithTarget(cocos2d::Object *target, SEL_MenuHandler selector ){    _target = target;    CC_SAFE_RETAIN(_target);    return initWithCallback( std::bind(selector,target, std::placeholders::_1) );}
开发者ID:BoniGauglitz,项目名称:OpenBird,代码行数:7,


示例2: CC_SAFE_RETAIN

void AtlasNode::setTextureAtlas(TextureAtlas* textureAtlas){    CC_SAFE_RETAIN(textureAtlas);    CC_SAFE_RELEASE(_textureAtlas);    _textureAtlas = textureAtlas;}
开发者ID:Jennal,项目名称:cocos2dx-3.2-qt,代码行数:6,


示例3: m_texture

VolatileTexture_richlabel::VolatileTexture_richlabel(CCTexture2D_richlabel* t) :m_texture(t),m_cachedImageType(kInvalid) {    s_textures.push_back(this);    CC_SAFE_RETAIN(m_texture);}
开发者ID:Cocos2d-x-vn,项目名称:cocos2dx-better,代码行数:6,


示例4: CC_SAFE_RETAIN

void MapManager::loadFarMap(int resId,int mapResRow,int mapResColumn){    if(_currentFarResId==resId)        return;//    if (floor(resId/1000)!=3) return;        _currentFarResId=resId;    if(_farMapNode)    {        _farMapNode->removeFromParent();    }    else    {        _farMapNode=Node::create();        CC_SAFE_RETAIN(_farMapNode);    }    if (_farMapImgsMap)    {        _farMapImgsMap->clear();    }    else    {        _farMapImgsMap=new std::map<std::string,bool>;    }       std::stringstream myStringStream;    myStringStream<<"map/"<<resId;    std::string mapDir=myStringStream.str();        char mapImgPath[256]={0};    float offsetX=0.0f;//    float offsetY=0.0f;    Sprite* spriteNode=nullptr;    bool isPictureExist=false;    Size contentSize;    for (int row =1;row<=mapResRow;row++)    {        for (int column=1;column<=mapResColumn;column++)        {            sprintf(mapImgPath, "%s/m%d%03d.jpg",mapDir.c_str(),row,column);            isPictureExist=FileUtils::getInstance()->isFileExist(mapImgPath);            if (!isPictureExist)            {                sprintf(mapImgPath, "%s/m%d%03d.png",mapDir.c_str(),row,column);                isPictureExist=FileUtils::getInstance()->isFileExist(mapImgPath);            }            if(isPictureExist)            {                spriteNode=Sprite::create(mapImgPath);                spriteNode->setAnchorPoint(Vec2::ANCHOR_TOP_LEFT);                _farMapNode->addChild(spriteNode);                spriteNode->setPosition(offsetX,_mapHeight);                                contentSize=spriteNode->getContentSize();                offsetX=offsetX+contentSize.width;                                (*_farMapImgsMap)[mapImgPath]=true;            }            else            {                offsetX=offsetX+512;                CCLOG("far map file no exist:%s",mapImgPath);            }        }    }}
开发者ID:backjy,项目名称:kongkongxiyou,代码行数:66,


示例5: running

GameLayer::GameLayer() :		running(true) {	timer = TimerSprite::create();	CC_SAFE_RETAIN(timer);}
开发者ID:beforeeight,项目名称:sort,代码行数:5,


示例6: CCAssert

	bool CCTMXTiledMap::initWithTMXFile(const char *tmxFile)	{		CCAssert(tmxFile != NULL && strlen(tmxFile)>0, "TMXTiledMap: tmx file should not bi nil");				setContentSize(CCSizeZero);		CCTMXMapInfo *mapInfo = CCTMXMapInfo::formatWithTMXFile(tmxFile);            if (! mapInfo)        {            return false;        }		CCAssert( mapInfo->getTilesets()->count() != 0, "TMXTiledMap: Map not found. Please check the filename.");		m_tMapSize = mapInfo->getMapSize();		m_tTileSize = mapInfo->getTileSize();		m_nMapOrientation = mapInfo->getOrientation();		setObjectGroups(mapInfo->getObjectGroups());		setProperties(mapInfo->getProperties());		CC_SAFE_RELEASE(m_pTileProperties);		m_pTileProperties = mapInfo->getTileProperties();		CC_SAFE_RETAIN(m_pTileProperties);		int idx = 0;		CCMutableArray<CCTMXLayerInfo*>* layers = mapInfo->getLayers();		if (layers && layers->count()>0)		{            if (NULL == m_pTMXLayers)            {                m_pTMXLayers = new CCDictionary<std::string, CCTMXLayer*>();                CCAssert(m_pTMXLayers, "Allocate memory failed!");            }			CCTMXLayerInfo *layerInfo = NULL;			CCMutableArray<CCTMXLayerInfo*>::CCMutableArrayIterator it;			for (it = layers->begin(); it != layers->end(); ++it)			{				layerInfo = *it;				if (layerInfo && layerInfo->m_bVisible)				{					CCTMXLayer *child = parseLayer(layerInfo, mapInfo);					addChild((CCNode*)child, idx, idx);                    // record the CCTMXLayer object by it's name                    std::string layerName = child->getLayerName();                    m_pTMXLayers->setObject(child, layerName);					// update content size with the max size					const CCSize& childSize = child->getContentSize();					CCSize currentSize = this->getContentSize();					currentSize.width = MAX( currentSize.width, childSize.width );					currentSize.height = MAX( currentSize.height, childSize.height );					this->setContentSize(currentSize);					idx++;				}			}		}		return true;	}
开发者ID:KerwinMa,项目名称:NDRemoteTest,代码行数:61,


示例7: CC_SAFE_RELEASE

void NodeGrid::setGrid(GridBase *grid){    CC_SAFE_RELEASE(_nodeGrid);    CC_SAFE_RETAIN(grid);    _nodeGrid = grid;}
开发者ID:0xiaohui00,项目名称:Cocos2dx-Wechat,代码行数:6,


示例8: CC_SAFE_RETAIN

void ArmatureAnimation::setUserObject(Ref *pUserObject){    CC_SAFE_RETAIN(pUserObject);    CC_SAFE_RELEASE(_userObject);    _userObject = pUserObject;}
开发者ID:bonlai,项目名称:3kaigame,代码行数:6,


示例9: CC_SAFE_RELEASE

void CCDirector::setNotificationNode(CCNode *node){	CC_SAFE_RELEASE(m_pNotificationNode);	m_pNotificationNode = node;	CC_SAFE_RETAIN(m_pNotificationNode);}
开发者ID:qvbige240,项目名称:cocos2d-1.0.1-x-0.13.0-beta,代码行数:6,


示例10: CC_SAFE_RETAIN

void CCTMXLayer::setTileSet(CCTMXTilesetInfo* var){    CC_SAFE_RETAIN(var);    CC_SAFE_RELEASE(m_pTileSet);    m_pTileSet = var;}
开发者ID:1901,项目名称:CCDate,代码行数:6,


示例11: CC_SAFE_RETAIN

void CCTextureAtlas::setTexture(CCTexture2D * var){    CC_SAFE_RETAIN(var);    CC_SAFE_RELEASE(m_pTexture);    m_pTexture = var;}
开发者ID:BradB132,项目名称:cocos2d-x,代码行数:6,


示例12: CC_SAFE_RETAIN

void Hero::setTiledMap(CCTMXTiledMap* map){	CC_SAFE_RETAIN(map);	CC_SAFE_RELEASE(m_map);	this->m_map = map;}
开发者ID:Jormungendr,项目名称:HotPunch,代码行数:6,


示例13: CC_SAFE_RETAIN

void CCMenuItemToggle::setSubItems(CCArray* var){    CC_SAFE_RETAIN(var);    CC_SAFE_RELEASE(m_pSubItems);    m_pSubItems = var;}
开发者ID:caoguoping,项目名称:warCraft,代码行数:6,


示例14: CC_SAFE_RETAIN

	void CCTMXTiledMap::setObjectGroups(CCMutableArray<CCTMXObjectGroup*>* var)	{		CC_SAFE_RETAIN(var);		CC_SAFE_RELEASE(m_pObjectGroups);		m_pObjectGroups = var;	}
开发者ID:KerwinMa,项目名称:NDRemoteTest,代码行数:6,


示例15: CC_SAFE_RETAIN

void Situation::raiseSituation(Situation* situation) {    this->subSituation = situation;    CC_SAFE_RETAIN(this->subSituation);}
开发者ID:vuadoc,项目名称:BigHero,代码行数:4,


示例16: CC_SAFE_RETAIN

void Node::setUserObject(Ref* userObject){    CC_SAFE_RETAIN(userObject);    CC_SAFE_RELEASE(_userObject);    _userObject = userObject;}
开发者ID:2youyou2,项目名称:cocos2d-x-lite,代码行数:6,


示例17: CC_SAFE_RELEASE_NULL

bool MainMenuLayer::init(){	if (!Layer::init())	{		return false;	}	Size visibleSize = Director::getInstance()->getVisibleSize();	Vec2 origin = Director::getInstance()->getVisibleOrigin();	CC_SAFE_RELEASE_NULL(_pPauseAndGold);	CC_SAFE_RELEASE_NULL(_pRestartButton);	CC_SAFE_RELEASE_NULL(_pGoldText);	CC_SAFE_RELEASE_NULL(_pGoldImage);	CC_SAFE_RELEASE_NULL(_pPauseButton);	_pPauseAndGold = cocostudio::GUIReader::getInstance()->widgetFromJsonFile("HUD/HUD.json");	this->addChild(_pPauseAndGold, 100);	CC_SAFE_RETAIN(_pPauseAndGold);	_pGoldText = dynamic_cast<ui::TextAtlas *>(_pPauseAndGold->getChildByName("gold"));	CC_SAFE_RETAIN(_pGoldText);	_pGoldText->setString("0");	_pGoldText->setPosition(Vec2(origin.x + visibleSize.width - _pGoldText->getContentSize().width,		origin.y + visibleSize.height - _pGoldText->getContentSize().height));	_pGoldImage = dynamic_cast<ui::ImageView *>(_pPauseAndGold->getChildByName("Image_3"));	_pGoldImage->setPosition(Vec2(_pGoldText->getPositionX() - _pGoldImage->getContentSize().width,		_pGoldText->getPositionY()));	CC_SAFE_RETAIN(_pGoldImage);		_pPauseButton = dynamic_cast<cocos2d::ui::Button *>(_pPauseAndGold->getChildByName("Button_1"));	CC_SAFE_RETAIN(_pPauseButton);	_pPauseButton->addTouchEventListener(		[&](Ref * sender,cocos2d::ui::Widget::TouchEventType type)		{			static bool bIsPaused = false;			if (type == cocos2d::ui::Widget::TouchEventType::ENDED)			{				if (bIsPaused)				{					bIsPaused = false;					Director::getInstance()->resume();				}				else				{					Director::getInstance()->pause();					bIsPaused = true;				}			}//if_type					}//lambdy	);	_pPauseButton->setPosition(Vec2(origin.x + _pPauseButton->getContentSize().width / 2,		origin.y + visibleSize.height - _pPauseButton->getContentSize().height / 2));	_pPauseButton->setVisible(true);	auto closeItem = MenuItemImage::create(		"CloseNormal.png",		"CloseSelected.png",		CC_CALLBACK_1(MainMenuLayer::menuCloseCallback, this));	closeItem->setPosition(Vec2(origin.x + visibleSize.width - closeItem->getContentSize().width / 2,		origin.y + closeItem->getContentSize().height / 2));	auto menu = Menu::create(closeItem, NULL);	menu->setPosition(Vec2::ZERO);	this->addChild(menu, 100);	auto label = Label::createWithTTF("Game Parkour", "fonts/Marker Felt.ttf", 24);	label->setPosition(Vec2(origin.x + visibleSize.width / 2,		origin.y + visibleSize.height - label->getContentSize().height));	this->addChild(label,100);	//this->scheduleUpdate();	_pGoldChanged = EventListenerCustom::create(RegitsteredEvents::GOLD_CHANGED, CC_CALLBACK_1(MainMenuLayer::ChangeGold, this));	Director::getInstance()->getEventDispatcher()->addEventListenerWithSceneGraphPriority(_pGoldChanged, this);	CC_SAFE_RETAIN(_pGoldChanged);	_pRestartButton = cocostudio::GUIReader::getInstance()->widgetFromJsonFile("Menu/Menu.json");	this->addChild(_pRestartButton, 10);	auto restart_btn = dynamic_cast<cocos2d::ui::Button *>(_pRestartButton->getChildByName("restart"));	restart_btn->addTouchEventListener([&](Ref* sender, cocos2d::ui::Widget::TouchEventType type) {		if (type == cocos2d::ui::Widget::TouchEventType::ENDED) {			Director::getInstance()->getEventDispatcher()->dispatchCustomEvent(RegitsteredEvents::GAME_RESTART);		}	});	_pRestartButton->setVisible(false);	CC_SAFE_RETAIN(_pRestartButton);		return true;}
开发者ID:freex,项目名称:A_ParkourJingz,代码行数:99,


示例18: CC_SAFE_RETAIN

void RenderState::setStateBlock(RenderState::StateBlock* state){    CC_SAFE_RETAIN(state);    CC_SAFE_RELEASE(_state);    _state = state;}
开发者ID:602147629,项目名称:PlanetWar,代码行数:6,


示例19: CC_SAFE_RETAIN

void ActionObject::play(CallFunc* func){    this->play();	this->_CallBack = func;	CC_SAFE_RETAIN(_CallBack);}
开发者ID:253627764,项目名称:FantasyWarrior3D,代码行数:6,


示例20: CC_SAFE_RETAIN

void EventDispatcher::removeEventListener(EventListener* listener){    if (listener == nullptr)        return;        // just return if listener is in _toRemovedListeners to avoid remove listeners more than once    if (std::find(_toRemovedListeners.begin(), _toRemovedListeners.end(), listener) != _toRemovedListeners.end())        return;    bool isFound = false;        auto removeListenerInVector = [&](std::vector<EventListener*>* listeners){        if (listeners == nullptr)            return;                for (auto iter = listeners->begin(); iter != listeners->end(); ++iter)        {            auto l = *iter;            if (l == listener)            {                CC_SAFE_RETAIN(l);                l->setRegistered(false);                if (l->getAssociatedNode() != nullptr)                {                    dissociateNodeAndEventListener(l->getAssociatedNode(), l);                    l->setAssociatedNode(nullptr);  // nullptr out the node pointer so we don't have any dangling pointers to destroyed nodes.                }                                if (_inDispatch == 0)                {                    iter = listeners->erase(iter);                    releaseListener(l);                }                else                {                    _toRemovedListeners.push_back(l);                }                                isFound = true;                break;            }        }    };        for (auto iter = _listenerMap.begin(); iter != _listenerMap.end();)    {        auto listeners = iter->second;        auto fixedPriorityListeners = listeners->getFixedPriorityListeners();        auto sceneGraphPriorityListeners = listeners->getSceneGraphPriorityListeners();        removeListenerInVector(sceneGraphPriorityListeners);        if (isFound)        {            // fixed #4160: Dirty flag need to be updated after listeners were removed.            setDirty(listener->getListenerID(), DirtyFlag::SCENE_GRAPH_PRIORITY);        }        else        {            removeListenerInVector(fixedPriorityListeners);            if (isFound)            {                setDirty(listener->getListenerID(), DirtyFlag::FIXED_PRIORITY);            }        }        #if CC_NODE_DEBUG_VERIFY_EVENT_LISTENERS        CCASSERT(_inDispatch != 0 ||                 !sceneGraphPriorityListeners ||                 std::count(sceneGraphPriorityListeners->begin(), sceneGraphPriorityListeners->end(), listener) == 0,                 "Listener should be in no lists after this is done if we're not currently in dispatch mode.");                    CCASSERT(_inDispatch != 0 ||                 !fixedPriorityListeners ||                 std::count(fixedPriorityListeners->begin(), fixedPriorityListeners->end(), listener) == 0,                 "Listener should be in no lists after this is done if we're not currently in dispatch mode.");#endif        if (iter->second->empty())        {            _priorityDirtyFlagMap.erase(listener->getListenerID());            auto list = iter->second;            iter = _listenerMap.erase(iter);            CC_SAFE_DELETE(list);        }        else        {            ++iter;        }                if (isFound)            break;    }    if (isFound)    {        releaseListener(listener);    }    else    {        for(auto iter = _toAddedListeners.begin(); iter != _toAddedListeners.end(); ++iter)//.........这里部分代码省略.........
开发者ID:Fuzesunshine,项目名称:CocosTest,代码行数:101,


示例21: GAFLOGERROR

bool GAFAsset::initWithImageData(const std::string& jsonPath){	if (!s3eFileCheckExists(jsonPath.c_str()))	{		GAFLOGERROR("CAN NOT create GAFAsset : %s does not exists", jsonPath.c_str());		return false;	}	GAFData aConfigData;	//std::string fp = CCFileUtils::sharedFileUtils()->fullPathForFilename(jsonPath.c_str());	std::string fp = jsonPath;	s3eFile * file = s3eFileOpen (fp.c_str(), "rb");	if (!file)	{		GAFLOGERROR("CAN NOT create GAFAsset : can not open %s.", fp.c_str());		return false;	}		aConfigData.setSize(s3eFileGetSize(file));	aConfigData.setBytes(new unsigned char[aConfigData.size()]);	s3eFileRead(aConfigData.bytes(), aConfigData.size(), 1, file);	s3eFileClose(file);	aConfigData.setDeleteData(true);	if (!aConfigData.bytes())	{		GAFLOGERROR("Can not get data from json file : %s", jsonPath.c_str());		return NULL;	}	if (!aConfigData.bytes())	{		GAFLOGWARN("can not init GAFAsset - invalid anImageData");		return false;	}		CCDictionary* configDictionary = CCJSONConverter::sharedConverter()->dictionaryFrom( (const char *)aConfigData.bytes());		CCString *versionNode               = (CCString*)configDictionary->objectForKey(kVersionKey);		if (!isAssetVersionPlayable(versionNode->getCString()))	{		return false;	}	CCArray *animationConfigFrames      = (CCArray *)configDictionary->objectForKey(kAnimationConfigFramesKey);	CCArray *interactionObjectNodes     = (CCArray *)configDictionary->objectForKey(kInteractionObjectsKey);	CCArray *standObjectsNodes          = (CCArray *)configDictionary->objectForKey(kStandObjectsKey);	CCArray *textureAtlasNode           = (CCArray *)configDictionary->objectForKey(kTextureAtlasKey);	CCArray *animationSequences         = (CCArray *)configDictionary->objectForKey(kAnimationSequencesKey);		CCDictionary *objectNodes           = (CCDictionary *)configDictionary->objectForKey(kAnimationObjectsKey);	CCDictionary *masksNodes            = (CCDictionary *)configDictionary->objectForKey(kAnimationMasksKey);	CCDictionary *namedPartsNodes       = (CCDictionary *)configDictionary->objectForKey(kAnimationNamedPartsKey);		if (!animationConfigFrames || !textureAtlasNode|| !objectNodes)	{		GAFLOGERROR("Error while creating GAFAsset. Required subnodes in dictionary are missing.");		return false;	}		CC_SAFE_RELEASE(_textureAtlas);		if (!textureAtlasNode->count())	{		return false;	}	CCDictionary * atlasDictionary = (CCDictionary *)textureAtlasNode->objectAtIndex(0);	float atlasScale = atlasScaleFromAtlasConfig(atlasDictionary);	for (int i = 1; i < textureAtlasNode->count(); ++i)	{		CCDictionary * a = (CCDictionary *)textureAtlasNode->objectAtIndex(i);		float as = atlasScaleFromAtlasConfig(a);		if ( fabs(atlasScale - _currentDeviceScale) > fabs(as - _currentDeviceScale))		{			atlasDictionary = a;			atlasScale = as;		}	}		_usedAtlasContentScaleFactor = atlasScale;	CCArray * atlasesInfo = (CCArray *)atlasDictionary->objectForKey(kAtlasInfoKey);	if (!atlasesInfo)	{		GAFLOGERROR("Error while creating GAFAsset.atlasesInfo subnode is missing in atlasDictionary.");		return false;	}		_textureAtlas = GAFTextureAtlas::create(fp.c_str(), atlasDictionary);	if (!_textureAtlas)	{		GAFLOGERROR("Failed to initialize GAFAsset. GAFTextureAtlas could not be created.");		return false;	}	CC_SAFE_RETAIN(_textureAtlas);		if (_objects != objectNodes)	{		CC_SAFE_RELEASE(_objects);		_objects = objectNodes;//.........这里部分代码省略.........
开发者ID:digitalassetgroup,项目名称:-BIBS-Game,代码行数:101,


示例22: getOpacity

bool CCScale9Sprite::updateWithBatchNode(CCSpriteBatchNode* batchnode, CCRect rect, bool rotated, CCRect capInsets){    GLubyte opacity = getOpacity();    ccColor3B color = getColor();    // Release old sprites    this->removeAllChildrenWithCleanup(true);    CC_SAFE_RELEASE(this->_centre);    CC_SAFE_RELEASE(this->_top);    CC_SAFE_RELEASE(this->_topLeft);    CC_SAFE_RELEASE(this->_topRight);    CC_SAFE_RELEASE(this->_left);    CC_SAFE_RELEASE(this->_right);    CC_SAFE_RELEASE(this->_bottomLeft);    CC_SAFE_RELEASE(this->_bottom);    CC_SAFE_RELEASE(this->_bottomRight);        if(this->_scale9Image != batchnode)    {        CC_SAFE_RELEASE(this->_scale9Image);        _scale9Image = batchnode;        CC_SAFE_RETAIN(_scale9Image);    }    _scale9Image->removeAllChildrenWithCleanup(true);    m_capInsets = capInsets;        // If there is no given rect    if ( rect.equals(CCRectZero) )    {        // Get the texture size as original        CCSize textureSize = _scale9Image->getTextureAtlas()->getTexture()->getContentSize();            rect = CCRectMake(0, 0, textureSize.width, textureSize.height);    }        // Set the given rect's size as original size    m_spriteRect = rect;    m_originalSize = rect.size;    m_preferredSize = m_originalSize;    m_capInsetsInternal = capInsets;        float w = rect.size.width;    float h = rect.size.height;    // If there is no specified center region    if ( m_capInsetsInternal.equals(CCRectZero) )    {        // CCLog("... cap insets not specified : using default cap insets ...");        m_capInsetsInternal = CCRectMake(w/3, h/3, w/3, h/3);    }    float left_w = m_capInsetsInternal.origin.x;    float center_w = m_capInsetsInternal.size.width;    float right_w = rect.size.width - (left_w + center_w);    float top_h = m_capInsetsInternal.origin.y;    float center_h = m_capInsetsInternal.size.height;    float bottom_h = rect.size.height - (top_h + center_h);    // calculate rects    // ... top row    float x = 0.0;    float y = 0.0;    // top left    CCRect lefttopbounds = CCRectMake(x, y,                                      left_w, top_h);    // top center    TRANSLATE_X(x, y, left_w);    CCRect centertopbounds = CCRectMake(x, y,                                        center_w, top_h);            // top right    TRANSLATE_X(x, y, center_w);    CCRect righttopbounds = CCRectMake(x, y,                                       right_w, top_h);    // ... center row    x = 0.0;    y = 0.0;    TRANSLATE_Y(x, y, top_h);    // center left    CCRect leftcenterbounds = CCRectMake(x, y,                                         left_w, center_h);    // center center    TRANSLATE_X(x, y, left_w);    CCRect centerbounds = CCRectMake(x, y,                                     center_w, center_h);    // center right    TRANSLATE_X(x, y, center_w);    CCRect rightcenterbounds = CCRectMake(x, y,//.........这里部分代码省略.........
开发者ID:angelleecash,项目名称:products,代码行数:101,


示例23: _contourData

ColliderBody::ColliderBody(ContourData *contourData)    : _contourData(contourData){    CC_SAFE_RETAIN(_contourData);}
开发者ID:0xiaohui00,项目名称:Cocos2dx-Wechat,代码行数:5,


示例24: CC_SAFE_RETAIN

void TextureAtlas::setTexture(Texture2D * var){    CC_SAFE_RETAIN(var);    CC_SAFE_RELEASE(_texture);    _texture = var;}
开发者ID:Ben-Cortina,项目名称:GameBox,代码行数:6,


示例25: CC_SAFE_RELEASE

void ClippingNode::setStencil(Node *stencil){    CC_SAFE_RELEASE(_stencil);    _stencil = stencil;    CC_SAFE_RETAIN(_stencil);}
开发者ID:smj10j,项目名称:LightSwarm,代码行数:6,


示例26: CC_SAFE_RETAIN

void Cocos2dxAtlasNode::setTextureAtlas(TextureAtlas* var){    CC_SAFE_RETAIN(var);    CC_SAFE_RELEASE(m_pTextureAtlas);    m_pTextureAtlas = var;}
开发者ID:114393824,项目名称:DragonBonesCPP,代码行数:6,



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


C++ CC_UNLIKELY函数代码示例
C++ CC_SAFE_RELEASE_NULL函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。