本文整理汇总了C++中TMonsterAIUtil::GetXYToPatrol方法的典型用法代码示例。如果您正苦于以下问题:C++ TMonsterAIUtil::GetXYToPatrol方法的具体用法?C++ TMonsterAIUtil::GetXYToPatrol怎么用?C++ TMonsterAIUtil::GetXYToPatrol使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TMonsterAIUtil
的用法示例。
在下文中一共展示了TMonsterAIUtil::GetXYToPatrol方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ApplyElementGroupMove
BOOL TMonsterAIElement::ApplyElementGroupMove(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-그룹이동");
if ( lpObj->PathStartEnd )
return FALSE;
BOOL bFindXY = FALSE;
BOOL bFoundLeader = TRUE;
int iLeaderIndex = -1;
iLeaderIndex = TMonsterAIGroup::FindGroupLeader(lpObj->m_iGroupNumber);
if ( iLeaderIndex == -1 || gObj[iLeaderIndex].Live == FALSE )
bFoundLeader = FALSE;
if ( bFoundLeader && gObjCalDistance(lpObj, &gObj[iLeaderIndex]) > 6 )
{
lpObj->TargetNumber = iLeaderIndex;
bFindXY = MONSTER_UTIL.GetXYToChase(lpObj);
}
else if ( pAIState->m_iTransitionType == 2 )
{
bFindXY = MONSTER_UTIL.GetXYToChase(lpObj);
}
else
{
bFindXY = MONSTER_UTIL.GetXYToPatrol(lpObj);
}
if ( bFindXY )
{
if ( MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, TRUE) )
{
}
else
{
MONSTER_UTIL.GetXYToPatrol(lpObj);
MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, TRUE);
}
}
return FALSE;
}
示例2: ApplyElementMove
BOOL TMonsterAIElement::ApplyElementMove(int iIndex, int iTargetIndex, TMonsterAIState * pAIState)
{
LPOBJ lpObj = &gObj[iIndex];
UTIL.SendCrywolfChattingMsg(iIndex, "Element-이동");
KANTURU_UTIL.SendKanturuChattingMsg(iIndex, "Element-이동");
if ( lpObj->PathStartEnd )
return FALSE;
BOOL bFindXY = FALSE;
if ( pAIState->m_iTransitionType == 2 )
bFindXY = MONSTER_UTIL.GetXYToChase(lpObj);
else
bFindXY = MONSTER_UTIL.GetXYToPatrol(lpObj);
if ( bFindXY )
MONSTER_UTIL.FindPathToMoveMonster(lpObj, lpObj->MTX, lpObj->MTY, 5, 1);
return FALSE;
}