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

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

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

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

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

示例1: switch

bool PauseState::handleEvent(const sf::Event& evt){    // Don't process events which the gui wants    if (xy::Nim::wantsMouse() || xy::Nim::wantsKeyboard())    {        return true;    }        if (evt.type == sf::Event::KeyReleased)    {        switch (evt.key.code)        {        default: break;        case sf::Keyboard::Escape:        case sf::Keyboard::P:        case sf::Keyboard::Pause:            unpause();            break;        }    }    else if (evt.type == sf::Event::JoystickButtonReleased)    {        if (evt.joystickButton.joystickId == 0)        {            if (evt.joystickButton.button == 7) //start on xbox            {                unpause();            }        }    }        m_scene.getSystem<xy::UISystem>().handleEvent(evt);    m_scene.forwardEvent(evt);    return false;}
开发者ID:JonnyPtn,项目名称:xygine,代码行数:35,


示例2: UpdateData

//******************************************************************************************************void CStartStopParticleSystem::start(){	UpdateData();	switch(_State)	{		case Stopped:			if (_ActiveNode)			{					if (checkHasLoop(*_ActiveNode)) return;				play(*_ActiveNode);					nlassert(_PlayingNodes.empty());				_PlayingNodes.push_back(_ActiveNode);			}			GetDlgItem(IDC_RESET_COUNT)->EnableWindow(TRUE);		break;		case RunningSingle:			// no-op		return;		break;		case RunningMultiple:			stop();			start();		break;		case PausedSingle:			if (_ActiveNode)			{				unpause(*_ActiveNode);			}		break;		case PausedMultiple:			for(uint k = 0; k < _PlayingNodes.size(); ++k)			{				if (_PlayingNodes[k])				{					unpause(*_PlayingNodes[k]);				}			}			stop();			start();		break;		default:			nlassert(0);		break;	}	_State = RunningSingle;	updateUIFromState();		if (m_LinkPlayToScenePlay) // is scene animation subordinated to the fx animation	{		// start animation for the scene too		if (_AnimationDLG)		{			_AnimationDLG->Playing = true;		}	}	}
开发者ID:mixxit,项目名称:solinia,代码行数:56,


示例3: switch

void cTimer::handleEvents(const SDL_Event * event){	int x=0, y=0;	switch (event->type) 	{	case SDL_KEYDOWN: 		switch(event->key.keysym.sym)		{		case SDLK_p: 						pause();			break;		case SDLK_u: 						unpause();			break;		case SDLK_r: 						start();			break;		case SDLK_s: 						stop();			break;		default:;		};	default: ;	}}
开发者ID:cromambo,项目名称:wxLife,代码行数:28,


示例4: pause

void GameScreen::toggleCheatMode(bool b){    if (b)    {        ui->ballSpeedBtn->show();        ui->paddleSpeedBtn->show();        ui->ballSpeedEdit->show();        ui->paddleSpeedEdit->show();        ui->ballSpeedLbl->show();        ui->paddleSpeedLbl->show();        ui->infoLbl->show();        pause();        ui->textEdit->resize(ui->textEdit->width(), ui->bottomLine->pos().y() - eventLogHalfSizePos->y());        ui->textEdit->move(*eventLogHalfSizePos);    }    else    {        ui->ballSpeedBtn->hide();        ui->paddleSpeedBtn->hide();        ui->ballSpeedEdit->hide();        ui->paddleSpeedEdit->hide();        ui->ballSpeedLbl->hide();        ui->paddleSpeedLbl->hide();        ui->infoLbl->hide();        ui->ballSpeedEdit->clear();        ui->paddleSpeedEdit->clear();        unpause();        ui->textEdit->resize(ui->textEdit->width(), ui->bottomLine->pos().y() - ui->menuBar->height() - 15);        ui->textEdit->move(*eventLogFullSizePos);    }}
开发者ID:zoness32,项目名称:BrickBreak,代码行数:31,


示例5: stop

void stop() { 	if (thread_handle != INVALID_HANDLE_VALUE)	{		if (paused)			unpause();		killDecodeThread=1;		if (WaitForSingleObject(thread_handle,5000) == WAIT_TIMEOUT)		{			MessageBox(mod.hMainWindow,"error asking thread to die!/n","error killing decode thread",0);			TerminateThread(thread_handle,0);		}		CloseHandle(thread_handle);		thread_handle = INVALID_HANDLE_VALUE;	}	if (input_file != INVALID_HANDLE_VALUE)	{		CloseHandle(input_file);		input_file=INVALID_HANDLE_VALUE;	}	GSFClose();	mod.outMod->Close();	mod.SAVSADeInit();}
开发者ID:Kinglions,项目名称:modizer,代码行数:25,


示例6: pause

void RegularBattleScene::onShiftSpots(int player, int spot1, int spot2, bool){    gui.zone->updatePoke(data()->spot(player, spot1));    gui.zone->updatePoke(data()->spot(player, spot2));    pause();    QTimer::singleShot(500, this, SLOT(unpause()));}
开发者ID:Isa-,项目名称:pokemon-online,代码行数:7,


示例7: updateTimestamp

void Game::gameLoop() {    const GameClock::timeFormat timeDelta = updateTimestamp();    mainWindow.clear(defaultClearColour);    gameObjectManager.updateAll(timeDelta);	mainWindow.display();	sf::Event currentEvent;	if(mainWindow.pollEvent(currentEvent)) {	    switch(currentEvent.type) {        case sf::Event::Closed:            gameState = EXITING;            break;        case sf::Event::GainedFocus:            unpause();            break;        case sf::Event::LostFocus:            pause();            break;        default:            break;	    }	}}
开发者ID:nairn1983,项目名称:game2,代码行数:26,


示例8: unpause

 void Timer::pauseToggle() {     if(priv->paused) {         unpause();     } else {         pause();     } }
开发者ID:winglot,项目名称:WEngine,代码行数:7,


示例9: pause

void NormalGame::display_stats(){	STACKTRACE;	pause();	int i;	for (i = 0; i < num_players; i += 1) {		Fleet *fleet = player_fleet[i];		switch (log->type) {			case Log::log_net1client:			case Log::log_net1server:			{				//				if (log->get_direction(player_control[i]->channel) & Log::direction_write)				message.print(6000, 15, "%s status: : %d / ?? Ships, %d / ??? points", player_name[i], fleet->getSize(), fleet->getCost());				//				else				//					message.print(6000, 15, "%s status: : %d / %d points", buffy, fleet->cost, player_total_fleet[i]);			}			break;			default:			{				message.print(6000, 15, "%s status: : %d / ?? Ships, %d / ??? points", player_name[i], fleet->getSize(), fleet->getCost());			}			break;		}	}	unpause();	return;}
开发者ID:Yurand,项目名称:tw-light,代码行数:27,


示例10: CMap

void CAtlas::fadeOutCallback() {  if (m_eSwitchMapType == SMT_FADE_ALPHA || m_eSwitchMapType == SMT_FADE_ELLIPTIC) {    // delete old map    m_pCurrentMap->deleteNow();    // create next = current map    m_pCurrentMap = new CMap(this, CMapPackPtr(new CMapPack(CFileManager::getResourcePath("maps/Atlases/LightWorld/"), m_sNextMap)), m_pSceneNode, m_pPlayer);    mFirstFrame = true;    CMapPackPtr currPack = m_pCurrentMap->getMapPack();    CEntrance *pEntrance = getNextEntrancePtr();    Ogre::Vector3 vPlayerPos = pEntrance->getPlayerAbsolutePosition() + m_pPlayer->getPosition() - m_pPlayer->getFloorPosition();    m_pPlayer->enterMap(m_pCurrentMap, vPlayerPos + pEntrance->getPlayerDirection() * 0.2);    m_pPlayer->setPosition(vPlayerPos);    m_bPlayerTargetReached = false;    unpause(PAUSE_ALL);    CMessageHandler::getSingleton().addMessage(new CMessageSwitchMap(m_pCurrentMap->getMapPack()->getName(), CMessageSwitchMap::SWITCHING, m_eSwitchMapType, m_pCurrentMap, nullptr, m_sNextMapEntrance));    if (m_eSwitchMapType == SMT_FADE_ELLIPTIC) {      mEllipticFader.startFadeIn(1);      mEllipticFader.setFadeCenter(Ogre::Vector2::ZERO);    }    else {      mAlphaFader.startFadeIn(1);    }  }}
开发者ID:ChWick,项目名称:Zelda,代码行数:30,


示例11: getPending

S32 LLQueuedThread::updateQueue(U32 max_time_ms){	F64 max_time = (F64)max_time_ms * .001;	LLTimer timer;	S32 pending = 1;	// Frame Update	if (mThreaded)	{		pending = getPending();		if(pending > 0)		{		unpause();		}	}	else	{		while (pending > 0)		{			pending = processNextRequest();			if (max_time && timer.getElapsedTimeF64() > max_time)				break;		}	}	return pending;}
开发者ID:CasperWarden,项目名称:CasperViewer,代码行数:26,


示例12: pause

/** This is the main interface to update the world. This function calls *  update(), and checks then for the end of the race. Note that race over  *  handling can not necessarily be done in update(), since not all *  data structures might have been updated (e.g.LinearWorld must *  call World::update() first, to get updated kart positions. If race *  over would be handled in World::update, LinearWorld had no opportunity *  to update its data structures before the race is finished). *  /param dt Time step size. */void World::updateWorld(float dt){    if (m_schedule_pause)    {        pause(m_scheduled_pause_phase);        m_schedule_pause = false;    }    else if (m_schedule_unpause)    {        unpause();        m_schedule_unpause = false;    }        if (m_self_destruct)    {        delete this;        return;    }        // Don't update world if a menu is shown or the race is over.    if( getPhase() == FINISH_PHASE         ||        getPhase() == IN_GAME_MENU_PHASE      )          return;    update(dt);    if( (!isFinishPhase()) && isRaceOver())    {        enterRaceOverState();    }}   // updateWorld
开发者ID:kiennguyen1994,项目名称:game-programming-cse-hcmut-2012,代码行数:39,


示例13: dvbChannel

RESULT eServiceTS::start(){	ePtr<eDVBResourceManager> rmgr;	eDVBResourceManager::getInstance(rmgr);	eDVBChannel dvbChannel(rmgr, 0);	if (dvbChannel.getDemux(m_decodedemux, iDVBChannel::capDecode) != 0) {		eDebug("Cannot allocate decode-demux");		return -1;	}	if (m_decodedemux->getMPEGDecoder(m_decoder) != 0) {		eDebug("Cannot allocate MPEGDecoder");		return -1;	}	if (m_destfd == -1)	{		m_destfd = m_decodedemux->openDVR(O_WRONLY);		if (m_destfd < 0)		{			eDebug("openDVR failed");			return -1;		}	}	m_decoder->setVideoPID(m_vpid, eDVBVideo::MPEG2);	m_decoder->setAudioPID(m_apid, eDVBAudio::aMPEG);	m_streamthread = new eStreamThread();	CONNECT(m_streamthread->m_event, eServiceTS::recv_event);	m_decoder->pause();	if (unpause() != 0) 		return -1;	m_event(this, evStart);	return 0;}
开发者ID:OpenLD,项目名称:enigma2,代码行数:32,


示例14: pause

void Timer::paused(bool b){	if (b) {		pause();	} else {		unpause();	}}
开发者ID:ThomvanDijk,项目名称:HexagonGame,代码行数:8,


示例15: pause

void TrackStatusHandler::onPlay(wxCommandEvent& event) {    if (m_pipeline != NULL) {        if (m_pipeline->getState() == Pipeline::STATE_PLAYING) {            pause();        } else if (m_pipeline->getState() == Pipeline::STATE_PAUSED) {            unpause();        }    }}
开发者ID:krpors,项目名称:navi,代码行数:9,


示例16: switch

void CParticleEditor::startMultiple(){	switch(_State)	{	case State::Stopped:		{			if (!_PW) return;			nlassert(_PlayingNodes.empty());			TPWNodeItr itr = _PW->getNodeList().begin();			while(itr != _PW->getNodeList().end())			{				CWorkspaceNode *node = (*itr);				if (node->isLoaded())					if (checkHasLoop(*node)) return;				itr++;			}						itr = _PW->getNodeList().begin();			while(itr != _PW->getNodeList().end())			{				CWorkspaceNode *node = (*itr);				if (node->isLoaded())				{					// really start the node only if there's no trigger anim					if (node->getTriggerAnim().empty())						play(*node);					_PlayingNodes.push_back(node);				}				itr++;			}		}		break;		case State::PausedSingle:		case State::RunningSingle:			stop();			startMultiple();		break;		case State::RunningMultiple:			// no-op			return;		break;		case State::PausedMultiple:			for(uint k = 0; k < _PlayingNodes.size(); ++k)			{				if (_PlayingNodes[k])				{					unpause(*_PlayingNodes[k]);				}			}		break;		default:			nlassert(0);		break;	}	_State = State::RunningMultiple;}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:57,


示例17: connect

void GameMenu::setConnections(){    connect(this->buttons[0], SIGNAL(clicked()), this, SLOT(singleplayer()));    connect(this->buttons[1], SIGNAL(clicked()), this, SLOT(multiplayer()));    connect(this->buttons[2], SIGNAL(clicked()), glView, SLOT(quit()));    connect(this->buttons[3], SIGNAL(clicked()), this, SLOT(getPaddle()));    connect(this->buttons[4], SIGNAL(clicked()), this, SLOT(unpause()));    connect(this->buttons[5], SIGNAL(clicked()), this, SLOT(reset()));    connect(this->buttons[6], SIGNAL(clicked()), this, SLOT(reset()));}
开发者ID:JordanBlocher,项目名称:qt-opengl,代码行数:10,


示例18: unpause

void MediaController::play(){    // When the play() method is invoked, the user agent must invoke the play method of each    // slaved media element in turn,    for (MediaElementSequence::const_iterator it = m_mediaElements.begin(); it != m_mediaElements.end(); ++it)        (*it)->play();    // and then invoke the unpause method of the MediaController.    unpause();}
开发者ID:smil-in-javascript,项目名称:blink,代码行数:10,


示例19: doRomLoad

bool doRomLoad(const char* path, const char* logical) {    NDS_Pause(false);    if(NDS_LoadROM(path, logical) >= 0) {        INFO("Loading %s was successful/n",path);        unpause();        if (autoframeskipenab && frameskiprate) AutoFrameSkip_IgnorePreviousDelay();        return true;    }    return false;}
开发者ID:dcvz,项目名称:desmume-mobile,代码行数:10,


示例20: unpause

void AnimationPlayer::play(){    unpause();    if (!m_content)        return;    double currentTime = this->currentTime();    if (m_playbackRate > 0 && (currentTime < 0 || currentTime >= sourceEnd()))        setCurrentTime(0);    else if (m_playbackRate < 0 && (currentTime <= 0 || currentTime > sourceEnd()))        setCurrentTime(sourceEnd());}
开发者ID:Mihiri,项目名称:blink,代码行数:11,


示例21: unpause

void GlobalTimer::togglePause(){    if(paused_) {        Logger::write("Un-Pausing");        unpause();    }    else {        Logger::write("Pausing");        pause();    }}
开发者ID:jdmack,项目名称:tlb,代码行数:11,


示例22: pause

//----------------------------------------------------------------------------//void AnimationInstance::togglePause(bool skipNextStep){    if (isRunning())    {        pause();    }    else    {        unpause(skipNextStep);    }}
开发者ID:ALArmagost,项目名称:IV-Network,代码行数:12,


示例23: unpause

void cTimer::start(void){	if(paused)		unpause();	if(!running)	{		running = true;		paused = false;		pausedTick = 0;		startTick = SDL_GetTicks();	}}
开发者ID:cromambo,项目名称:wxLife,代码行数:12,


示例24: setCurrentTime

void AnimationPlayer::reverse(){    if (!m_playbackRate)        return;    if (m_content) {        if (m_playbackRate > 0 && currentTime() > sourceEnd())            setCurrentTime(sourceEnd());        else if (m_playbackRate < 0 && currentTime() < 0)            setCurrentTime(0);    }    setPlaybackRate(-m_playbackRate);    unpause();}
开发者ID:Mihiri,项目名称:blink,代码行数:13,



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


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