本文整理汇总了C++中CEntity::Destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ CEntity::Destroy方法的具体用法?C++ CEntity::Destroy怎么用?C++ CEntity::Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEntity
的用法示例。
在下文中一共展示了CEntity::Destroy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
DETOUR_DECL_MEMBER1(RemoveEntity, void, CBaseHandle, handle)
{
CEntity *cent = CEntity::Instance(handle);
if(cent)
{
cent->Destroy();
}
DETOUR_MEMBER_CALL(RemoveEntity)(handle);
}
示例2: RemoveEdict
void CEntityManager::RemoveEdict(edict_t *e)
{
CEntity *pEnt = CEntity::Instance(e);
if (pEnt)
{
assert(0);
g_pSM->LogMessage(myself, "Edict Removed, removing CEntity");
pEnt->Destroy();
}
}
示例3: RemoveEntities
void CGameWorld::RemoveEntities()
{
// destroy objects marked for destruction
for(int i = 0; i < NUM_ENTTYPES; i++)
for(CEntity *pEnt = m_apFirstEntityTypes[i]; pEnt; )
{
m_pNextTraverseEntity = pEnt->m_pNextTypeEntity;
if(pEnt->m_MarkedForDestroy)
{
RemoveEntity(pEnt);
pEnt->Destroy();
}
pEnt = m_pNextTraverseEntity;
}
}
示例4: EntityDestroy
int CLuaFile::EntityDestroy(lua_State *L)
{
lua_getglobal(L, "pLUA");
CLuaFile *pSelf = (CLuaFile *)lua_touserdata(L, -1);
lua_Debug Frame;
lua_getstack(L, 1, &Frame);
lua_getinfo(L, "nlSf", &Frame);
if (!lua_isnumber(L, 1))
return 0;
CEntity *pEnt = pSelf->m_pServer->m_World.GetEntityByID(lua_tointeger(L, 1));
if (pEnt)
{
pEnt->Destroy();
}
return 0;
}