• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ NextStep函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: SetData

    void SetData(uint32 uiI, uint32 uiValue)
    {
        switch (uiI)
        {
        case 1:
            SetEscortPaused(true);
            DoScriptText(SAY_BLASTMASTER_0, me);
            NextStep(1500, true);
            break;
        case 2:
            if (!pInstance)
                return;

            switch (uiValue)
            {
            case 1:
                pInstance->SetData(TYPE_EVENT, IN_PROGRESS);
                break;
            case 2:
                pInstance->SetData(TYPE_EVENT, DONE);
                NextStep(5000, false, 22);
                break;
            }
            break;
        }
    }
开发者ID:Phentora,项目名称:OregonCore,代码行数:26,代码来源:gnomeregan.cpp


示例2: UpdateAI

       void UpdateAI(uint32 uiDiff)
        {
            ScriptedAI::UpdateAI(uiDiff);

            if (uiTimer <= uiDiff)
            {
                switch (uiPhase)
                {
                    case 1:
                        DoSummonGrandChampion(uiSecondBoss);
                        NextStep(10000, true);
                        break;
                    case 2:
                        DoSummonGrandChampion(uiThirdBoss);
                        NextStep(0, false);
                        break;
                    case 3:
                        if (!Champion1List.empty())
                        {
                            for (std::list<uint64>::const_iterator itr = Champion1List.begin(); itr != Champion1List.end(); ++itr)
                                if (Creature* summon = Unit::GetCreature(*me, *itr))
                                    AggroAllPlayers(summon);
                            NextStep(0, false);
                        }
                        break;
                }
            } else uiTimer -= uiDiff;

            if (!UpdateVictim())
                return;
        }
开发者ID:AtVirus,项目名称:Forgotten-Lands-Source,代码行数:31,代码来源:trial_of_the_champion.cpp


示例3: UpdateAI

    void UpdateAI(const uint32 uiDiff)
    {
        if (m_bEventEnded || !m_bEventStarted)
            return;

        if (m_uiEventTimer <= uiDiff)
        {
            switch (m_uiEventPhase)
            {
                case 0:
                    DoScriptText(SAY_COUNCIL_INTRO_1, m_creature);
                    NextStep(15000);
                    break;
                case 1:
                    DoScriptText(SAY_COUNCIL_INTRO_2, m_creature);
                    NextStep(5000);
                    break;
                case 2:
                    // raise princes
                    if (m_pInstance)
                    {
                        if (Creature *pTaldaram = m_pInstance->GetSingleCreatureFromStorage(NPC_TALDARAM))
                        {
                            pTaldaram->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                            pTaldaram->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH);
                            pTaldaram->SetInCombatWithZone();
                        }
                        if (Creature *pKeleseth = m_pInstance->GetSingleCreatureFromStorage(NPC_KELESETH))
                        {
                            pKeleseth->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                            pKeleseth->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH);
                            pKeleseth->SetInCombatWithZone();
                        }
                        if (Creature *pValanar = m_pInstance->GetSingleCreatureFromStorage(NPC_VALANAR))
                        {
                            pValanar->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                            pValanar->RemoveAurasDueToSpell(SPELL_FEIGN_DEATH);
                            pValanar->SetInCombatWithZone();
                        }
                    }
                    m_creature->SetVisibility(VISIBILITY_OFF);
                    m_bEventEnded = true;
                    break;
                default:
                    break;
            }
        }
        else
            m_uiEventTimer -= uiDiff;
    }
开发者ID:Erotix8210,项目名称:scriptdev2,代码行数:50,代码来源:blood_prince_council.cpp


示例4: UpdateAI

    void UpdateAI(const uint32 uiDiff)
    {
        if (!m_bIsEventStarted || m_bIsEventFinished)
            return;

        if (m_uiEventTimer <= uiDiff)
        {
            switch (m_uiStep)
            {
                case 0:
                    break;
                case 1:
                    DoScriptText(SAY_SVALNA_1, m_creature);
                    NextStep(12000);
                    break;
                case 2:
                    /*if (Unit* pCrok = m_pInstance->GetSingleCreatureFromStorage(NPC_CROK))
                    {
                        DoScriptText(SAY_CROK_1, pCrok);
                        pCrok->GetMotionMaster()->MovePoint(0, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, SpawnLoc[0].o);
                    }
                    if (Unit* pArnath = m_pInstance->GetSingleCreatureFromStorage(NPC_ARNATH))
                        pArnath->GetMotionMaster()->MovePoint(0, SpawnLoc[1].x, SpawnLoc[1].y, SpawnLoc[1].z, SpawnLoc[1].o);
                    if (Unit* pBrandon = m_pInstance->GetSingleCreatureFromStorage(NPC_BRANDON))
                        pBrandon->GetMotionMaster()->MovePoint(0, SpawnLoc[2].x, SpawnLoc[2].y, SpawnLoc[2].z, SpawnLoc[2].o);
                    if (Unit* pGrondel = m_pInstance->GetSingleCreatureFromStorage(NPC_GRONDEL))
                        pGrondel->GetMotionMaster()->MovePoint(0, SpawnLoc[3].x, SpawnLoc[3].y, SpawnLoc[3].z, SpawnLoc[3].o);
                    if (Unit* pRupert = m_pInstance->GetSingleCreatureFromStorage(NPC_RUPERT))
                        pRupert->GetMotionMaster()->MovePoint(0, SpawnLoc[4].x, SpawnLoc[4].y, SpawnLoc[4].z, SpawnLoc[4].o);*/
                    NextStep();
                    break;
                case 3:
                    break;
                case 4:
                    DoScriptText(SAY_SVALNA_2, m_creature);
                    NextStep(30000);
                    break;
                case 5:
                    DoScriptText(SAY_SVALNA_3, m_creature);
                    NextStep();
                    break;
                default:
                    break;
            }
        }
        else
            m_uiEventTimer -= uiDiff;
    }
开发者ID:Agustinls,项目名称:scriptdev2,代码行数:48,代码来源:icecrown_citadel.cpp


示例5: PlayGame

int PlayGame(int *Parameter){

    Board gameBoard,nextBoard;
    int i;
    int maxLevel;

    InitGame(gameBoard);
    PrintBoard(gameBoard);

    while (1){
        NextStep(nextBoard,gameBoard, Parameter, COUNT_STEP, MoveLeft, MoveRight, MoveUp, MoveDown);
        UpdateBoard(gameBoard,nextBoard);
        maxLevel = FinishGame(gameBoard);
        if ( maxLevel != 0){
            break;
        }
        if (PLAY_MODE == 1)
            if ( TotalScore > 1000)
                Sleep(1000);
            else
                Sleep(100);
    }

    return maxLevel;
}
开发者ID:EelaiWind,项目名称:2048,代码行数:25,代码来源:Conscious_Openmp.c


示例6: if

bool CFX_LedRandomAnimation::UpdateAnimation(int timeStep)
{
  bool returnval = false;
  m_stepIncrement++;
  m_brightness += m_brightnessIncrement;
  if (m_brightness > 255)
  {
    m_output->SetBrightness(255);
  }
  else if (m_brightness < 0)
  {
    m_output->SetBrightness(0);
  }
  else
  {
    m_output->SetBrightness(m_brightness);
  }

  if (m_stepIncrement >= m_totalIncrements)
  {
    NextStep();
    returnval = true;
  }
  return returnval;
}
开发者ID:CustomFX,项目名称:CustomFX,代码行数:25,代码来源:CFX_LedRandomAnimation.cpp


示例7: IsConfigInfoValid

/*
 *	NOTE:	This function has an important side effect.  If this machine
 *			is not the first in a new cell, then this function will get the
 *			cell name from the config info.  The cell name may be needed in 
 *			config calls that come later, and so this function must be called
 *			before they are.
 */
static int IsConfigInfoValid(BOOL& bValid, afs_status_t& nStatus)
{
    if (bCancel)
	return FALSE;
	
    afs_status_t configStatus;
    char *pszCellName = 0;

    NextStep(IDS_CHECK_CONFIG_INFO);

    bValid = FALSE;

    g_LogFile.Write("Is there valid configuration information on this machine: ");
    int nResult = cfg_HostQueryStatus(GetHostnameA(), &configStatus, &pszCellName, &nStatus);
    if (!nResult)
	return FALSE;

    g_LogFile.WriteBoolResult((configStatus == 0));

    if (configStatus == 0)
	lstrncpy(g_CfgData.szCellName, A2S(pszCellName), MAX_CELL_NAME_LEN);
    else
	g_LogFile.WriteError("The configuration information on this host is not valid", configStatus);

    bValid = (BOOL)(configStatus == 0);

    return TRUE;
}
开发者ID:maxendpoint,项目名称:openafs_cvs,代码行数:35,代码来源:get_cur_config.cpp


示例8: UpdateAI

        void UpdateAI(const uint32 diff)
        {

            if (YellTimer <= diff)
            {
                if (EventStarted)
                    YellTimer = NextStep(Step++);
            } else YellTimer -= diff;

            if (Step >= 7 && Step <= 12)
            {
                Unit* arca = Unit::GetUnit(*me, ArcanagosGUID);

                if (FireArcanagosTimer <= diff)
                {
                    if (arca)
                        arca->CastSpell(me, SPELL_FIRE_BALL, false);
                    FireArcanagosTimer = 6000;
                } else FireArcanagosTimer -= diff;

                if (FireMedivhTimer <= diff)
                {
                    if (arca)
                        DoCast(arca, SPELL_FIRE_BALL);
                    FireMedivhTimer = 5000;
                } else FireMedivhTimer -= diff;
            }
        }
开发者ID:Krill156,项目名称:FreyaCore,代码行数:28,代码来源:karazhan.cpp


示例9: SetData

    void SetData(uint32 uiType, uint32 uiData)
    {
        switch (uiType)
        {
            case DATA_START:
                if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                    pInstance->HandleGameObject(pGO->GetGUID(),true);
			    if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE1)))
                    pInstance->HandleGameObject(pGO->GetGUID(),false);	
                DoScriptText(SAY_START, me);			
                DoSummonGrandChampion(uiFirstBoss);
                NextStep(10000,false,1);
                break;
            case DATA_IN_POSITION: //movement done.		
		        me->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);			
                me->GetMotionMaster()->MovePoint(1,735.898, 651.961, 411.93);
				DoScriptText(SAY_START2, me);
                if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE)))
                    pInstance->HandleGameObject(pGO->GetGUID(),false);
                NextStep(20000,false,3);
                break;
            case DATA_LESSER_CHAMPIONS_DEFEATED:
            {
                ++uiLesserChampions;
                std::list<uint64> TempList;
                if (uiLesserChampions == 3 || uiLesserChampions == 6)
                {
                    switch(uiLesserChampions)
                    {
                        case 3:
                            TempList = Champion2List;
                            break;
                        case 6:
                            TempList = Champion3List;
                            break;
                    }

                    for (std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
                        if (Creature* pSummon = Unit::GetCreature(*me, *itr))
                            AggroAllPlayers(pSummon);
                }else if (uiLesserChampions == 9)
                    StartGrandChampionsAttack();

                break;
            }
        }
    }
开发者ID:Asandru,项目名称:Script-Land,代码行数:47,代码来源:trial_of_the_champion.cpp


示例10: UpdateAI

		void UpdateAI(const uint32 diff) {
			if (SayTimer <= diff) {
				if (EventStarted) {
					SayTimer = NextStep(Step++);
				}
			} else
				SayTimer -= diff;
		}
开发者ID:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:8,代码来源:azuremyst_isle.cpp


示例11: switch

		DWORD ISequence::Next(void)
		{
			switch(m_seq_type)
			{
				case SEQ_STEP: NextStep(); break;
				case SEQ_FUNCTION: sequence_func(); break;
			}
			return m_dwNumber;
		}
开发者ID:andrewgbliss,项目名称:CPPImpulseEngine,代码行数:9,代码来源:ISequence.cpp


示例12: UpdateAI

 void UpdateAI(const uint32 diff)
 {
     if (StepsTimer <= diff)
     {
         if (Intro)
             StepsTimer = NextStep(++Steps);
     }
     else StepsTimer -= diff;
 }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:9,代码来源:old_hillsbrad.cpp


示例13: UpdateAI

 void UpdateAI(const uint32 diff)
 {
     if (SayTimer <= diff)
     {
         if (EventStarted)
             SayTimer = NextStep(++Step);
     }
     else SayTimer -= diff;
 }
开发者ID:Adeer,项目名称:OregonCore,代码行数:9,代码来源:azuremyst_isle.cpp


示例14: UpdateAI

 void UpdateAI(uint32 diff) override
 {
     if (SayTimer <= diff)
     {
         if (EventStarted)
             SayTimer = NextStep(Step++);
     }
     else
         SayTimer -= diff;
 }
开发者ID:maximusfun,项目名称:funcorecata,代码行数:10,代码来源:zone_azuremyst_isle.cpp


示例15: NextStep

 void AntennaMissionState::Retry(std::uint8_t limit)
 {
     if ((this->_retryCount + 1) == limit)
     {
         NextStep();
     }
     else
     {
         ++this->_retryCount;
     }
 }
开发者ID:PW-Sat2,项目名称:PWSat2OBC,代码行数:11,代码来源:antenna.cpp


示例16: SetData

        void SetData(uint32 uiType, uint32 /*uiData*/)
        {
            switch (uiType)
            {
                case DATA_START:
                    DoSummonGrandChampion(uiFirstBoss);
                    NextStep(10000, false, 1);
                    break;
                case DATA_IN_POSITION: //movement done.
                    me->GetMotionMaster()->MovePoint(1, 735.81f, 661.92f, 412.39f);
                    if (GameObject* go = GameObject::GetGameObject(*me, instance->GetData64(DATA_MAIN_GATE)))
                        instance->HandleGameObject(go->GetGUID(), false);
                    NextStep(10000, false, 3);
                    break;
                case DATA_LESSER_CHAMPIONS_DEFEATED:
                {
                    ++uiLesserChampions;
                    std::list<uint64> TempList;
                    if (uiLesserChampions == 3 || uiLesserChampions == 6)
                    {
                        switch (uiLesserChampions)
                        {
                            case 3:
                                TempList = Champion2List;
                                break;
                            case 6:
                                TempList = Champion3List;
                                break;
                        }

                        for (std::list<uint64>::const_iterator itr = TempList.begin(); itr != TempList.end(); ++itr)
                            if (Creature* summon = Unit::GetCreature(*me, *itr))
                                AggroAllPlayers(summon);
                    }else if (uiLesserChampions == 9)
                        StartGrandChampionsAttack();

                    break;
                }
            }
        }
开发者ID:AtVirus,项目名称:Forgotten-Lands-Source,代码行数:40,代码来源:trial_of_the_champion.cpp


示例17: NextStep

bool CFX_LedAnimationSequence::UpdateAnimation(int timeStep)
{
  bool returnval = false;
  m_stepIncrement++;
  m_output->SetBrightness(CalculateValue(m_stepIncrement, m_totalIncrements, m_startBrightness,
    m_steps[m_activeStep].brightness, m_steps[m_activeStep].type));

  if (m_stepIncrement >= m_totalIncrements)
  {
    returnval = NextStep();
  }
  return returnval;
}
开发者ID:CustomFX,项目名称:CustomFX,代码行数:13,代码来源:CFX_LedAnimationSequence.cpp


示例18: MoveInLineOfSight

    void MoveInLineOfSight(Unit *pWho)
    {
        if (!m_bIsEventStarted)
        {
            if (pWho->GetTypeId() == TYPEID_PLAYER)
            {
                m_bIsEventStarted = true;
                NextStep();
            }
        }

        ScriptedAI::MoveInLineOfSight(pWho);
    }
开发者ID:Agustinls,项目名称:scriptdev2,代码行数:13,代码来源:icecrown_citadel.cpp


示例19: watchdog_timer

__interrupt void watchdog_timer(void)
{
	// Dekrementuje zmienna uniemozliwiajaca zbyt czeste naciskanie przyciskow (eliminacja drgan).
	if (gTicksToEnableButton > 0)
		gTicksToEnableButton--;

	// Wywolywanie obslugi kolejnego zdarzenia po wyznaczonej liczbie taktow zegara.
	if (gTicksToNextStep > 0)
		gTicksToNextStep--;

	if (gTicksToNextStep == 0)
		NextStep();
}
开发者ID:Maskl,项目名称:wbudowaneproj,代码行数:13,代码来源:main.c


示例20: TESTTRAPL

void CTestMachine::StepRestoreDatabaseL()
	{
	test.Printf(_L("Restoring Database..."));
	delete iDb; iDb = NULL; //Close

	TESTTRAPL(CopyFileL(KTestFileBaseFullPath, KTestFileFullPath));
	//Open
	test.Printf(_L("Opening cntmodel..."));
	iDb=CContactDatabase::OpenL(KTestFile);
	
	NextStep();
	//User::After(1000000);
	test.Printf(_L("done!\n"));
	}
开发者ID:bavanisp,项目名称:qtmobility-1.1.0,代码行数:14,代码来源:t_viewsortplugin.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NextToken函数代码示例发布时间:2022-05-30
下一篇:
C++ NextSibling函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap