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

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

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

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

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

示例1: action

File SDClass::open(char *filepath, uint8_t mode) {  /*     Open the supplied file path for reading or writing.     The file content can be accessed via the `file` property of     the `SDClass` object--this property is currently     a standard `SdFile` object from `sdfatlib`.     Defaults to read only.     If `write` is true, default action (when `append` is true) is to     append data to the end of the file.     If `append` is false then the file will be truncated first.     If the file does not exist and it is opened for writing the file     will be created.     An attempt to open a file for reading that does not exist is an     error.   */  // TODO: Allow for read&write? (Possibly not, as it requires seek.)  fileOpenMode = mode;  walkPath(filepath, root, callback_openPath, this);  return File();}
开发者ID:dbarnett,项目名称:Arduino,代码行数:32,


示例2: walkPath

boolean SDClass::exists(char *filepath) {  /*     Returns true if the supplied file path exists.   */  return walkPath(filepath, root, callback_pathExists);}
开发者ID:tarosay,项目名称:v2wrbbfirm,代码行数:8,


示例3: walkPath

boolean MemoryCardDevice::makeDir(char *filepath) {  /*      A rough equivalent to `mkdir -p`.     */  return walkPath(filepath, root, callback_makeDirPath);}
开发者ID:bberg,项目名称:BrainCam,代码行数:8,


示例4: Idle

	GLvoid CImp::update(GLfloat deltaTime)	{		if (m_impState == IS_IDLE)		{			Idle(deltaTime);			//check for next space digging			//check for next space claiming			//check for next space walling			//check for digging			//check for claiming			//check for walling			checkNearestForDigging();			checkNearestForClaiming();			checkNearestForWalling();			checkForDigging();			checkForClaiming();			checkForWalling();		} else if (m_impState == IS_GOING_TO_DEPOSITING_GOLD_DESTINATION)		{			useAction(AA_WALK);			walkPath(deltaTime);				} else if (m_impState == IS_GOING_TO_DIGGING_DESTINATION)		{			useAction(AA_WALK);			walkPath(deltaTime);		} else if (m_impState == IS_GOING_TO_CLAIMING_DESTINATION)		{			useAction(AA_WALK);			walkPath(deltaTime);		} else if (m_impState == IS_GOING_TO_WALLING_DESTINATION)		{			useAction(AA_WALK);			walkPath(deltaTime);		} else if (m_impState == IS_AT_DEPOSITING_GOLD)		{			m_impState = IS_DEPOSITING_GOLD;		} else if (m_impState == IS_AT_DIGGING_BLOCK)		{			faceBlock(mCurrentBlock);			m_impState = IS_DIGGING;			useAction(AA_DIG);		} else if (m_impState == IS_AT_CLAIMING_BLOCK)		{			m_impState = IS_CLAIMING;			useAction(AA_CLAIM);		} else if (m_impState == IS_AT_WALLING_BLOCK)		{			faceBlock(mCurrentBlock);			m_impState = IS_WALLING;			useAction(AA_CLAIM);		} else if (m_impState == IS_DEPOSITING_GOLD)		{			//Todo: if a block has a 250 gold, upp it to 500...			bool found = false;			for (std::vector<block_objects::CBlockObject*>::iterator rmIter = mCurrentBlock->getBlockObjects()->begin(); rmIter != mCurrentBlock->getBlockObjects()->end(); rmIter++)			{				block_objects::CBlockObject *bObject = *rmIter;				if (bObject->getName() == "MODEL_GOLD250")					found = true;			}			if(!found)			{				mCurrentBlock->addModel("MODEL_GOLD250",mPosition);				PLAYER0_MONEY = PLAYER0_MONEY + this->getGold();//do for other teams				this->setGold(0);					m_impState = IS_IDLE;				useAction(AA_IDLE);			}			else			{				checkGoldLevels();			}		} else if (m_impState == IS_DIGGING)		{			if(mCurrentBlock->isLow() || !mCurrentBlock->isMarked())			{				m_impState = IS_IDLE;				useAction(AA_IDLE);				return;			}			if(mCurrentBlock->getType() == CV_BLOCK_TYPE_GOLD_ID)				//TODO: use a new formula				this->setGold(this->getGold() + 1);			mCurrentBlock->decLife(deltaTime*m_MoveSpeed);			if (mCurrentBlock->getLife()<=0.0f)			{				mCurrentBlock->digBlock();				m_impState = IS_IDLE;				useAction(AA_IDLE);			}			//Check if you have gold :)			checkGoldLevels();		} else if (m_impState == IS_CLAIMING)		{//.........这里部分代码省略.........
开发者ID:Captnoord,项目名称:NBK,代码行数:101,



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


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