//------------------------------------------------------------------------------------- bool Spaces::destroySpace(SPACE_ID spaceID, ENTITY_ID entityID) { INFO_MSG("Spaces::destroySpace: %u.\n", spaceID); Space* pSpace = Spaces::findSpace(spaceID); return pSpace->destroy(entityID); }
//------------------------------------------------------------------------------------- bool Spaces::destroySpace(SPACE_ID spaceID, ENTITY_ID entityID) { INFO_MSG(fmt::format("Spaces::destroySpace: {}.\n", spaceID)); Space* pSpace = Spaces::findSpace(spaceID); if(pSpace->isDestroyed()) return true; if(!pSpace->destroy(entityID)) { ERROR_MSG("Spaces::destroySpace: is error!\n"); return false; } spaces_.erase(spaceID); return true; }
//------------------------------------------------------------------------------------- bool Spaces::destroySpace(SPACE_ID spaceID, ENTITY_ID entityID) { INFO_MSG(fmt::format("Spaces::destroySpace: {}.\n", spaceID)); Space* pSpace = Spaces::findSpace(spaceID); if(pSpace->isDestroyed()) return true; if(!pSpace->destroy(entityID)) { //WARNING_MSG("Spaces::destroySpace: destroying!\n"); return false; } // 延时一段时间再销毁 //spaces_.erase(spaceID); return true; }