本文整理汇总了C++中BaseClass::EngineMessageFn方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseClass::EngineMessageFn方法的具体用法?C++ BaseClass::EngineMessageFn怎么用?C++ BaseClass::EngineMessageFn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseClass
的用法示例。
在下文中一共展示了BaseClass::EngineMessageFn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EngineMessageFn
uint32 Body::EngineMessageFn(uint32 messageID, void *pData, LTFLOAT fData)
{
switch(messageID)
{
case MID_UPDATE:
{
uint32 dwRet = Prop::EngineMessageFn(messageID, pData, fData);
Update();
return dwRet;
}
break;
case MID_LINKBROKEN :
{
HOBJECT hObject = (HOBJECT)pData;
HATTACHMENT hAttachment = LTNULL;
if ( LT_OK == g_pLTServer->FindAttachment(m_hObject, hObject, &hAttachment) )
{
if ( LT_OK == g_pLTServer->RemoveAttachment(hAttachment) )
{
}
}
if ( m_hChecker == hObject )
{
m_hChecker = LTNULL;
}
if ( m_hWeaponItem == hObject )
{
m_hWeaponItem = LTNULL;
}
for ( uint32 iSpear = 0 ; iSpear < kMaxSpears ; iSpear++ )
{
if ( m_ahSpears[iSpear] == hObject )
{
m_ahSpears[iSpear] = LTNULL;
}
}
break;
}
case MID_MODELSTRINGKEY:
{
HandleModelString((ArgList*)pData);
}
break;
case MID_INITIALUPDATE:
{
uint32 dwRet = Prop::EngineMessageFn(messageID, pData, fData);
// Set up the animator
m_Animator.Init(m_hObject);
SetNextUpdate(s_fUpdateDelta);
uint32 dwUsrFlags = g_pLTServer->GetObjectUserFlags(m_hObject);
g_pLTServer->SetObjectUserFlags(m_hObject, dwUsrFlags | USRFLG_NIGHT_INFRARED);
return dwRet;
}
break;
case MID_TOUCHNOTIFY:
{
HOBJECT hObject = (HOBJECT)pData;
if ( IsPlayer(hObject) )
{
if ( m_hWeaponItem )
{
BaseClass* pWeaponItem = (BaseClass*)g_pLTServer->HandleToObject(m_hWeaponItem);
pWeaponItem->EngineMessageFn(messageID, pData, fData);
}
for ( uint32 iSpear = 0 ; iSpear < m_cSpears ; iSpear++ )
{
if ( m_ahSpears[iSpear] )
{
BaseClass* pSpear = (BaseClass*)g_pLTServer->HandleToObject(m_ahSpears[iSpear]);
pSpear->EngineMessageFn(messageID, pData, fData);
}
}
}
if ( m_pState )
{
m_pState->HandleTouch(hObject);
}
}
break;
//.........这里部分代码省略.........