Minor - Improves scene editor and adds audio support - V13.1.0
Improves the scene editor by adding an inspector window to view and modify entity components. Adds audio component support with basic playback controls integrated into the inspector. Adds default audio files.
This commit is contained in:
@@ -128,6 +128,22 @@ public:
|
||||
m_NextEntityID = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get entity by ID (const version).
|
||||
* @param id The ID of the entity to retrieve.
|
||||
* @return A shared pointer to the entity, or nullptr if it does not exist.
|
||||
*/
|
||||
std::shared_ptr<Entity> GetEntityByID(EntityID entityID)
|
||||
{
|
||||
if (entityID < m_Entities.size())
|
||||
{
|
||||
return m_Entities[entityID];
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
}
|
||||
|
||||
private:
|
||||
EntityID m_NextEntityID;
|
||||
std::unordered_map<EntityID, std::shared_ptr<Entity>> m_Entities;
|
||||
|
||||
Reference in New Issue
Block a user