Sp3 5 ecs #135
|
@ -213,5 +213,14 @@ namespace SHADE
|
|||
return SHSerialization::DeserializeEntityToSceneFromString(data);
|
||||
}*/
|
||||
|
||||
|
||||
EntityID SHEntityManager::GetEntityByName(std::string const& name) noexcept
|
||||
{
|
||||
EntityID result = MAX_EID;
|
||||
for (auto& entity : entityVec)
|
||||
{
|
||||
if (entity->name == name)
|
||||
result = entity->GetEID();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -209,6 +209,8 @@ namespace SHADE
|
|||
|
||||
//static EntityID DuplicateEntity(EntityID eid) noexcept;
|
||||
|
||||
static EntityID GetEntityByName(std::string const& name) noexcept;
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue