本文整理汇总了C++中CMoveShape::GetAnimInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CMoveShape::GetAnimInfo方法的具体用法?C++ CMoveShape::GetAnimInfo怎么用?C++ CMoveShape::GetAnimInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMoveShape
的用法示例。
在下文中一共展示了CMoveShape::GetAnimInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StepEndAI
bool NormalCloseInAttackAI::StepEndAI()
{
if(m_pSkill)
{
CMoveShape* pMoveshape = dynamic_cast<CMoveShape*>(GetGame()->GetRegion()->FindChildObject(m_pSkill->GetSourType(), m_pSkill->GetSourID()));
if(pMoveshape)
{
AnimInfo::tagActionInfo *pActionInfo = pMoveshape->GetAnimInfo()->GetActionInfo();
if(pActionInfo && pMoveshape->GetAction() >= CShape::ACT_PERFORM)
{
pActionInfo->bCurActionLooped = FALSE;
}
}
if (pMoveshape->GetType() == TYPE_PET)
{
CPet *pPet = (CPet*)pMoveshape;
if (pPet->IsMainPlayerPet())
{
tagPetSkillInfo *pPetSkill = pPet->GetPetSkillInfoByID(m_pSkill->GetSkillID());
if(pPetSkill)
pPetSkill->bIsSkillUsingEnd = true;
//pPet->SkillSuccReceived();
}
}
// 删除特效
m_pSkill->DelAllEffectListByStep(CSkillXml::STEP_START);
m_pSkill->DelAllEffectListByStep(CSkillXml::STEP_RUN);
m_pSkill->DelAllEffectListByStep(CSkillXml::STEP_END);
m_pSkill->SetIsDeleted(true);
return true;
}
return false;
}
示例2: Display
/*
* 功能: 技能显示
* 摘要: -
* 参数: -
* 返回值: 始终true
* 作者: -
* 创建日期: -
* 修改日志:
* 2008.11.10 - lpf
* 增加了"仪态动作可切换"
*/
bool NormalCloseInAttackAI::Display()
{
// 获得释放者
CMoveShape* pMoveshape = dynamic_cast<CMoveShape*>(GetGame()->GetRegion()->FindChildObject(m_pSkill->GetSourType(), m_pSkill->GetSourID()));
if(pMoveshape)
{
if(m_pSkill->GetCurStep() == CSkillXml::STEP_START && m_pSkill->GetIntonateMainAct())
{
// 动作信息
AnimInfo::tagActionInfo *pActionInfo = pMoveshape->GetAnimInfo()->GetActionInfo();
// 如果处于吟唱阶段,那么在前期吟唱动作播放完之后,循环播放主要的吟唱动作
if(pActionInfo &&
(pMoveshape->GetAction() == CShape::ACT_STAND ||
pMoveshape->GetAction() == CShape::ACT_IDLE ||
(pMoveshape->GetAction() >= CShape::ACT_FACEACTION &&
pMoveshape->GetAction() <= CShape::ACT_FACEACTIONMAX))) //仪态动作可切换 - add by lpf(2008.11.10)
{
pMoveshape->SetAction(m_pSkill->GetIntonateMainAct());
pActionInfo->bCurActionLooped = TRUE;
}
}
// 释放阶段
else if(m_pSkill->GetCurStep() == CSkillXml::STEP_RUN && m_pSkill->GetRunStepActExQueue())
{
// 释放阶段续动作列表不为空,且当前动作是站立,将当前动作设置为后续动作列表的第一个动作
if(!m_pSkill->GetRunStepActExQueue()->empty() && pMoveshape->GetAction() == CShape::ACT_STAND)
{
pMoveshape->SetAction(m_pSkill->GetRunStepActExQueue()->front());
m_pSkill->GetRunStepActExQueue()->pop();
// 已经是最后一个动作
if(m_pSkill->GetRunStepActExQueue()->empty())
{
AnimInfo::tagActionInfo *pActionInfo = pMoveshape->GetAnimInfo()->GetActionInfo();
if(pActionInfo)
pActionInfo->bCurActionLooped = m_pSkill->IsActExCycle();
}
}
}
}
return true;
}