本文整理汇总了C++中CEntity::SetUniqueID方法的典型用法代码示例。如果您正苦于以下问题:C++ CEntity::SetUniqueID方法的具体用法?C++ CEntity::SetUniqueID怎么用?C++ CEntity::SetUniqueID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEntity
的用法示例。
在下文中一共展示了CEntity::SetUniqueID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateTmpEntity
CEntity* CEntityFactory::CreateTmpEntity(CStrID GUID, CStrID Category, PValueTable Table, int Row) const
{
CEntity* pEntity = CreateEntityByClassName("Entity");
pEntity->SetCategory(Category); //???add to dummy table all attrs if category exists?
pEntity->SetAttrTable(Table);
pEntity->SetAttrTableRowIndex(Row);
pEntity->SetUniqueID(GUID);
pEntity->SetLive(true);
return pEntity;
}
示例2: CreateEntityByTemplate
CEntity* CEntityFactory::CreateEntityByTemplate(CStrID GUID, CStrID Category, CStrID TplName, EntityPool EntPool)
{
n_assert(Category.IsValid());
n_assert(TplName.IsValid());
const CEntityCat& Cat = Categories[Category];
int TplIdx = FindTemplate(TplName, Cat);
if (TplIdx == INVALID_INDEX) return NULL;
CEntity* pEntity = CreateEntityByClassName(Cat.CppClass);
pEntity->SetLive(EntPool == LivePool);
pEntity->SetAttrTable(Cat.InstDataset->GetValueTable());
pEntity->SetAttrTableRowIndex(Cat.InstDataset->GetValueTable()->CopyExtRow(Cat.TplDataset->GetValueTable(), TplIdx, true));
pEntity->SetCategory(Category);
pEntity->SetUniqueID(GUID);
for (int i = 0; i < Cat.Properties.Size(); i++)
AttachProperty(*pEntity, Cat.Properties[i]);
return pEntity;
}