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

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

51自学网 2021-06-03 09:11:52
  C++
这篇教程C++ unscheduleUpdate函数代码示例写得很实用,希望能帮到您。

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

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

示例1: FighterWithEnemy

    static void FighterWithEnemy(Fighter * fighter, EnemyFighter * enemy, const int * score)    {        auto layer = fighter->getParent();        enemy->stopAllActions();        layer->addChild(Effect::CreateExplosionOnce(enemy->getPosition()));        layer->removeChild(enemy);        layer->unscheduleUpdate();        fighter->Hurt();        if (!fighter->Alive())        {            fighter->stopAllActions();            layer->addChild(Effect::CreateExplosionOnce(fighter->getPosition()));            layer->removeChild(fighter);            layer->unscheduleUpdate();            auto delay = cocos2d::DelayTime::create(2.0);            auto transition = cocos2d::CallFunc::create([score]{                int s = *score;                auto t = cocos2d::TransitionFade::create(2.0, GameOverScene::CreateScene(s));                cocos2d::Director::getInstance()->replaceScene(t);            });            layer->runAction(cocos2d::Sequence::create(delay, transition, nullptr));        }    }
开发者ID:LucienLIUFL,项目名称:Project,代码行数:28,


示例2: unscheduleUpdate

void MainScene::onExitTransitionDidStart(){   CCScene::onExitTransitionDidStart();      // Turn off updates   unscheduleUpdate();}
开发者ID:ChaitanyaGP,项目名称:SensorTest,代码行数:7,


示例3: CCLOG

void AssetsUpdateLayer::update(float delta){    if (1 || m_curBigVersion >= m_endBigVersion && m_curSmallVersion >= m_endSmallVersion)    {        CCLOG("Version check Ok");        unscheduleUpdate();        //MD5Check();        gameEnter();        return;    }    if (!m_isDownloading && checkUpdate())    {        createLayerItem();        char str[128];        sprintf(str, "%s%s%d.%d.%d.zip", SERVER_ADDRESS, ASSETS_SERVER_PATH, m_curBigVersion, m_curMidVersion, m_curSmallVersion + 1);        getAssetsManager()->setPackageUrl(str);        sprintf(str, "%d.%d.%d", m_curBigVersion, m_curMidVersion, m_curSmallVersion + 1);        getAssetsManager()->setVersionFileUrl(str);        getAssetsManager()->setStoragePath(m_pathToSave.c_str());        //sprintf(str, Localization::getInstance()->getValueByKey("Loading_download_restBag_num"), m_endSmallVersion - m_curSmallVersion);        //m_packegNumberLabel->setString(str);        m_curPackageLength = 0;        //getAssetsManager()->getPackageLength((long&)m_packageLength);        m_isDownloading = true;        download();    }}
开发者ID:sharpfforg,项目名称:us,代码行数:31,


示例4: scheduleUpdate

void TextFieldTTF::setCursorEnabled(bool enabled){    if (_currentLabelType == LabelType::TTF)    {        if (_cursorEnabled != enabled)        {            _cursorEnabled = enabled;            if (_cursorEnabled)            {                _cursorPosition = _charCount;                scheduleUpdate();            }            else            {                _cursorPosition = 0;                unscheduleUpdate();            }        }    }    else    {        CCLOG("TextFieldTTF cursor worked only LabelType::TTF");    }}
开发者ID:jun496276723,项目名称:CocosMFCEditor,代码行数:26,


示例5: unscheduleAllCallbacks

    void TextTip::onExit()    {        unscheduleAllCallbacks();        unscheduleUpdate();        Layout::onExit();    }
开发者ID:thibetabc,项目名称:gloudhelper,代码行数:7,


示例6: ccpAdd

void BPElevatorNode::update(float delta){    m_fDelayStart -= delta;        //  end delay    if (m_fDelayStart < 0)    {        if (!m_pHumanSprite->isVisible()) {            m_pHumanSprite->setVisible(true);        }                CCPoint p = m_pHumanSprite->getPosition();        p = ccpAdd(p, m_tVelocity);        m_pHumanSprite->setPosition(p);        if (m_pTargetPosition->boundingBox().containsPoint(p))        {            m_bArrivedHuman = true;            m_bHumanAppearUpdate = false;            unscheduleUpdate();            m_pHumanSprite->setVisible(false);            m_pHumanSprite->setPosition(m_pSpawnPosition->getPosition());                        m_pAlertBoardNode->setColor(ccRED);            m_pAlertLabelNode->setFontFillColor(ccWHITE);                        if (m_pDelegate) {                m_pDelegate->arrivedHuman(this);            }        }            }}
开发者ID:ddarazy,项目名称:bankPanic,代码行数:33,


示例7: unscheduleUpdate

LevelThree::~LevelThree(){// 	// 停止计时器// 	unschedule(schedule_selector(LevelThree::timeCounter));	// 停止默认定时器	unscheduleUpdate();}
开发者ID:xianglin-love,项目名称:threeColor,代码行数:7,


示例8: setMonsterStatus

void MonsterTortoise::setInvalidStatus(){	if (m_bIsDie)		return;	setMonsterStatus(MonsterStatus_Invalid);	//复位怪兽信息	setPosition(getBeginPos());	stopAllActions();	m_lastPos = getBeginPos();	setVisible(false);	getBody()->SetLinearVelocity(b2Vec2(0.0f, 0.0f));	m_bLeft = true;	if (m_bIsDefend)	{		//改变防守状态框架为正常框架		updateFixStatus = UpdateTortoise_Normal;		changeFixture();	}	updateFixStatus = UpdateTortoise_Invalid;	m_bIsDefend = false;	m_bIsRoll = false;	unscheduleUpdate();}
开发者ID:hantingmeixue,项目名称:MyCocosGame,代码行数:25,


示例9: unschedule

LevelTwentytwo::~LevelTwentytwo(){	// 停止计时器	unschedule(schedule_selector(LevelTwentytwo::timeCounter));	// 停止默认定时器	unscheduleUpdate();}
开发者ID:xianglin-love,项目名称:threeColor,代码行数:7,


示例10: unschedule

LevelFifteen::~LevelFifteen(){	// 停止计时器	unschedule(schedule_selector(LevelFifteen::timeCounter));	// 停止默认定时器	unscheduleUpdate();}
开发者ID:xianglin-love,项目名称:threeColor,代码行数:7,


示例11: unscheduleUpdate

void SkeletonRenderer::onExit () {#if CC_ENABLE_SCRIPT_BINDING	if (_scriptType == kScriptTypeJavascript && ScriptEngineManager::sendNodeEventToJSExtended(this, kNodeOnExit)) return;#endif	Node::onExit();	unscheduleUpdate();}
开发者ID:EvansThomas,项目名称:spine-runtimes,代码行数:7,


示例12: unscheduleUpdate

//-------------------------------------------------------CDistortLayer::~CDistortLayer(){	unscheduleUpdate();	free( m_pSpring );	free( m_pMass );}
开发者ID:Pancho2wang,项目名称:cocos2dx_shader_demo,代码行数:8,


示例13: unscheduleUpdate

void HelloWorld::stopTimer(){    if(timerRunning){        unscheduleUpdate();                timerRunning = false;    }}
开发者ID:leoin2012,项目名称:Cocos2d-x.3.2,代码行数:7,


示例14: movementEvent_selector

void HelloWorld::update(float delta){	if(m_bStart)	{		CCArmature *pHero = (CCArmature*)(m_pGameScene->getChildByTag(10005)->getComponent("CCArmature")->getNode());		pHero->getParent()->setPositionX(pHero->getParent()->getPositionX() + m_fSpeed);		CCArmature *pEnemy = (CCArmature*)(m_pGameScene->getChildByTag(10006)->getComponent("CCArmature")->getNode());		if(ccpDistance(ccp(pHero->getParent()->getPositionX(), 0), ccp(pEnemy->getParent()->getPositionX(), 0)) < m_fAttackDis)		{				pHero->getAnimation()->play("attack");			pHero->getAnimation()->setMovementEventCallFunc(this,                                                        movementEvent_selector(HelloWorld::animationEvent));			m_bStart = false;		}	}	if(m_bDead)	{		CCComRender *pUIRender = static_cast<CCComRender*>(m_pGameScene->getChildByTag(10007)->getComponent("GUIComponent"));		UILayer *pUILayer = static_cast<UILayer*>(pUIRender->getNode());		UILoadingBar *pHPLoadingBar = static_cast<UILoadingBar*>(pUILayer->getWidgetByName("hp02_LoadingBar"));		UILoadingBar *pMPLoadingBar = static_cast<UILoadingBar*>(pUILayer->getWidgetByName("mp02_LoadingBar"));		pHPLoadingBar->setPercent(m_fPercentage);		pMPLoadingBar->setPercent(m_fPercentage);		m_fPercentage -= 2.0f;        if (m_fPercentage < 0.0f) {            unscheduleUpdate();        }	}	}
开发者ID:shujunqiao,项目名称:CocoStudioSamples,代码行数:34,


示例15: log

void LoadingScene::update(float dt){    ++updatecount;    log("updateCount:%d........",updatecount);        if (m_curPreload_fodder_count<PRELOAD_FODDER_COUNT) {        LoadingEnemy(kEnemyFodder);        m_curPreload_fodder_count++;    }    else if(m_curPreload_fodderL_count<PRELOAD_FODDERL_COUNT)    {        LoadingEnemy(kEnemyFodderL);        m_curPreload_fodderL_count++;    }    else if (m_curPreload_BigDude_count<PRELOAD_BIGDUDE_COUBR)    {        LoadingEnemy(kEnemyBigDude);        m_curPreload_BigDude_count++;    }    else if (m_curPreload_Missile_count<PRELOAD_MISSILE_COUNT)    {        LoadingBullet(kPlayerMissiles);        m_curPreload_Missile_count++;    }    else if (m_curPreload_Boss_count<PRElOAD_BOSS_COUNT)    {        LoadingEnemy(kEnemyBoss);        m_curPreload_Boss_count++;    }    else    {        unscheduleUpdate();    }}
开发者ID:BestSean2016,项目名称:learn-cocos,代码行数:34,


示例16: setPositionX

void Block::update(float dt) {    setPositionX(getPositionX() - 3);    if (getPositionX() < 0) {        unscheduleUpdate();        removeFromParent();    }}
开发者ID:huhuang03,项目名称:NoOneDie,代码行数:7,


示例17: unscheduleUpdate

void CSKillMenuLayer::onExit(){    _eventDispatcher->removeEventListener(m_pListener);    CBaseLayer::onExit();    NotificationCenter::getInstance()->removeObserver(this,"CloseSkillGuide");    unscheduleUpdate();}
开发者ID:6520874,项目名称:-zhihuaqibing,代码行数:7,


示例18: unscheduleUpdate

MiniGameScene::~MiniGameScene() {    _eventDispatcher->removeEventListener(m_pSightListner);    unscheduleUpdate();    if (isScheduled(schedule_selector(MiniGameScene::startAction))) {        unschedule(schedule_selector(MiniGameScene::startAction));    }}
开发者ID:a347585962,项目名称:Class,代码行数:7,


示例19: unscheduleUpdate

void SGSHero::onDelay(SGMessage* message){  float time;  message->getFloat("time", &time);  unscheduleUpdate();  scheduleOnce(schedule_selector(SGSHero::startUpdate), time);}
开发者ID:cuongnv-ict,项目名称:sghero,代码行数:7,


示例20: unscheduleUpdate

void WaitingLayer::HideWaiting(){	this->setVisible(false);		unscheduleUpdate();    m_bShow = false;	m_sumHideTimer = 0;	m_hidingTimer = 0 ;}
开发者ID:niuzb,项目名称:hellopetclient,代码行数:8,


示例21: unscheduleUpdate

void UILoadingBarTest_Left::nextCallback(CCObject* sender, TouchEventType type){    if (type == TOUCH_EVENT_ENDED)    {        unscheduleUpdate();        UIScene::nextCallback(sender, type);    }}
开发者ID:aboduo,项目名称:cocos2dx-classical,代码行数:8,


示例22: unregisterScriptTapHandler

CCMenuItem::~CCMenuItem(){    unregisterScriptTapHandler();        // only when it's enabled as of now    if(m_isHoldingEnabled)        unscheduleUpdate();}
开发者ID:haxpor,项目名称:ReachabilityCpp,代码行数:8,


示例23: unscheduleUpdate

void HelloWorld::onExit(){	cocos2d::extension::CCArmatureDataManager::purge();	cocos2d::extension::ActionManager::shareManager()->purge();	unscheduleUpdate();	CCLayer::onExit();}
开发者ID:Ratel13,项目名称:CocoStudioConnector,代码行数:8,


示例24: setPosition

void ResetParticles::Delete(){	setPosition(cocos2d::Vec2(-100,-100));	setVisible(false);	m_isFollowing = false;	unscheduleUpdate();	m_isDeleted = true;}
开发者ID:tofurama3000,项目名称:The-Obscurity-Project,代码行数:8,


示例25: setPositionX

void Plane::update(float dt) {    setPositionX(getPositionX()+speedX);    if (getScaleX()>0) {        if (getPositionX()<-getContentSize().width) {            unscheduleUpdate();            planes->removeObject(this);            getParent()->removeChild(this);        }    } else {        if (getPositionX()>visibleSize.width+getContentSize().width) {            unscheduleUpdate();            planes->removeObject(this);            getParent()->removeChild(this);        }    }}
开发者ID:zhangyu4760,项目名称:Cocos2dXLessons20130907,代码行数:17,


示例26: unscheduleUpdate

void PlanePixelNode::update(float dt){    const float speed = 0.05;    if (_baseXDiff_current < _baseXDiff_target) {        _baseXDiff_current += dt*speed;        if (_baseXDiff_current > _baseXDiff_target) {            _baseXDiff_current = _baseXDiff_target;            unscheduleUpdate();        }    } else if (_baseXDiff_current > _baseXDiff_target) {        _baseXDiff_current -= dt*speed;        if (_baseXDiff_current < _baseXDiff_target) {            _baseXDiff_current = _baseXDiff_target;            unscheduleUpdate();        }    }}
开发者ID:dgkae,项目名称:hunters,代码行数:17,


示例27: unscheduleUpdate

//结束计时void JiejiScene::stopTimer(){	if(timeRunning)	{		unscheduleUpdate();		timeRunning = false;	}}
开发者ID:slwebwildwolf,项目名称:DontTapSeven,代码行数:9,


示例28: unscheduleUpdate

void HelloWorld::update(float dt){        label->setPosition(label->getPosition()+Point(1,1));        if (label->getPositionX()>500) {        unscheduleUpdate();    }}
开发者ID:Chris-Xin,项目名称:Cocos2dXLessons20140303,代码行数:8,


示例29: unscheduleUpdate

void UILoadingBarTest_Left::previousCallback(Ref* sender, TouchEventType type){    if (type == TOUCH_EVENT_ENDED)    {        unscheduleUpdate();        UIScene::previousCallback(sender, type);    }}
开发者ID:ntotani,项目名称:amiconveyor,代码行数:8,



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


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