本文整理汇总了C++中CGameObject::getDestroy方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameObject::getDestroy方法的具体用法?C++ CGameObject::getDestroy怎么用?C++ CGameObject::getDestroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameObject
的用法示例。
在下文中一共展示了CGameObject::getDestroy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
u32 CLevel::Objects_net_Save (NET_Packet* _Packet, u32 start, u32 max_object_size)
{
NET_Packet& Packet = *_Packet;
u32 position;
for (; start<Objects.o_count(); start++) {
CObject *_P = Objects.o_get_by_iterator(start);
CGameObject *P = smart_cast<CGameObject*>(_P);
// Msg ("save:iterating:%d:%s",P->ID(),*P->cName());
if (P && !P->getDestroy() && P->net_SaveRelevant()) {
Packet.w_u16 (u16(P->ID()) );
Packet.w_chunk_open16 (position);
// Msg ("save:saving:%d:%s",P->ID(),*P->cName());
P->net_Save (Packet);
#ifdef DEBUG
u32 size = u32 (Packet.w_tell()-position)-sizeof(u16);
// Msg ("save:saved:%d bytes:%d:%s",size,P->ID(),*P->cName());
if (size>=65536) {
Debug.fatal (DEBUG_INFO,"Object [%s][%d] exceed network-data limit\n size=%d, Pend=%d, Pstart=%d",
*P->cName(), P->ID(), size, Packet.w_tell(), position);
}
#endif
Packet.w_chunk_close16 (position);
// if (0==(--count))
// break;
if (max_object_size > (NET_PacketSizeLimit - Packet.w_tell()))
break;
}
}
return ++start;
}
示例2: GetMonsterHitInfo
CScriptMonsterHitInfo CScriptGameObject::GetMonsterHitInfo()
{
CScriptMonsterHitInfo ret_val;
CBaseMonster *l_tpMonster = smart_cast<CBaseMonster *>(&object());
if (l_tpMonster) {
if (l_tpMonster->HitMemory.is_hit()) {
CGameObject *pO = smart_cast<CGameObject *>(l_tpMonster->HitMemory.get_last_hit_object());
ret_val.set((pO && !pO->getDestroy()) ? pO->lua_game_object() : 0, l_tpMonster->HitMemory.get_last_hit_dir(), l_tpMonster->HitMemory.get_last_hit_time());
}
} else {
ai().script_engine().script_log(ScriptStorage::eLuaMessageTypeError,"CScriptGameObject : cannot access class member GetMonsterHitInfo!");
}
return (ret_val);
}
示例3: feel_touch_delete
void CCustomZone::feel_touch_delete(CObject* O)
{
CGameObject* pGameObject =smart_cast<CGameObject*>(O);
if(!pGameObject->getDestroy())
{
StopObjectIdleParticles(pGameObject);
}
OBJECT_INFO_VEC_IT it = std::find(m_ObjectInfoMap.begin(),m_ObjectInfoMap.end(),pGameObject);
if(it!=m_ObjectInfoMap.end())
{
exit_Zone(*it);
m_ObjectInfoMap.erase(it);
}
}