当前位置: 首页>>代码示例>>C++>>正文


C++ CAnimation::GetCurrentMovementRate方法代码示例

本文整理汇总了C++中CAnimation::GetCurrentMovementRate方法的典型用法代码示例。如果您正苦于以下问题:C++ CAnimation::GetCurrentMovementRate方法的具体用法?C++ CAnimation::GetCurrentMovementRate怎么用?C++ CAnimation::GetCurrentMovementRate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAnimation的用法示例。


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

示例1: DETOUR_EvaluateTrigger

BOOL DETOUR_CGameSprite::DETOUR_EvaluateTrigger(Trigger& t) {
	if (0) IECString("DETOUR_CGameSprite::DETOUR_EvaluateTrigger");

	Trigger tTemp = t;
	CCreatureObject* pCre = NULL;
	CGameSprite* pSprite = NULL;
	Object oCriteria;
	int nFindTargetResult = 0;
	BOOL bResult = FALSE;

	switch (tTemp.m_wOpcode) {
	case TRIGGER_MOVEMENT_RATE:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		CAnimation* pAnim = pCre->m_animation.m_pAnimation;
		if (pAnim == NULL) break;
		unsigned char nMvt = pAnim->GetCurrentMovementRate();
		bResult = (signed int)nMvt == tTemp.m_i;
		}
		break;
	case TRIGGER_MOVEMENT_RATE_GT:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		CAnimation* pAnim = pCre->m_animation.m_pAnimation;
		if (pAnim == NULL) break;
		unsigned char nMvt = pAnim->GetCurrentMovementRate();
		bResult = (signed int)nMvt > tTemp.m_i;
		}
		break;
	case TRIGGER_MOVEMENT_RATE_LT:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		CAnimation* pAnim = pCre->m_animation.m_pAnimation;
		if (pAnim == NULL) break;
		unsigned char nMvt = pAnim->GetCurrentMovementRate();
		bResult = (signed int)nMvt < tTemp.m_i;
		}
		break;
	case TRIGGER_NUM_MIRRORIMAGES:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		unsigned char nImages = pCre->m_nMirrorImages;
		bResult = (signed int)nImages == tTemp.m_i;
		}
		break;
	case TRIGGER_NUM_MIRRORIMAGES_GT:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		unsigned char nImages = pCre->m_nMirrorImages;
		bResult = (signed int)nImages > tTemp.m_i;
		}
		break;
	case TRIGGER_NUM_MIRRORIMAGES_LT:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		unsigned char nImages = pCre->m_nMirrorImages;
		bResult = (signed int)nImages < tTemp.m_i;
		}
		break;
	case TRIGGER_BOUNCING_SPELL_LEVEL:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		if (tTemp.m_i < 0) break;
		if (tTemp.m_i > 9) break;
		bResult = pCre->GetDerivedStats().m_bBounceSplLvl[tTemp.m_i] || pCre->GetDerivedStats().m_BounceSplLvlDec[tTemp.m_i].m_bOn;
		}
		break;
	case TRIGGER_NUM_BOUNCING_SPELL_LEVEL:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		if (tTemp.m_i < 0) break;
		if (tTemp.m_i > 9) break;
		unsigned int nNumBounce = 0;
		if (pCre->GetDerivedStats().m_bBounceSplLvl[tTemp.m_i]) {
			nNumBounce = UINT_MAX;
		} else {
			if (pCre->GetDerivedStats().m_BounceSplLvlDec[tTemp.m_i].m_bOn)
				nNumBounce = pCre->GetDerivedStats().m_BounceSplLvlDec[tTemp.m_i].m_nCount;
		}
		bResult = nNumBounce == tTemp.m_i2;
		}
		break;
	case TRIGGER_NUM_BOUNCING_SPELL_LEVEL_GT:
		{
		nFindTargetResult = FindTargetCreature(tTemp, &pCre);
		if (pCre == NULL) break;
		if (tTemp.m_i < 0) break;
		if (tTemp.m_i > 9) break;
		unsigned int nNumBounce = 0;
		if (pCre->GetDerivedStats().m_bBounceSplLvl[tTemp.m_i]) {
			nNumBounce = UINT_MAX;
		} else {
//.........这里部分代码省略.........
开发者ID:Ascension64,项目名称:TobEx,代码行数:101,代码来源:ObjectCore.cpp


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