Initial editor commit
- Add Entity Tree View used to select entities to be modified - Add Entity View used to Add/Remove/Edit Components of the Entity - Add Asset View which lists all available assets
This commit is contained in:
@@ -22,5 +22,22 @@ namespace Copium
|
||||
|
||||
virtual void RunEntity(Entity entity, Components&... components) {};
|
||||
virtual void RunEntity(const Signal& signal, Entity entity, Components&... components) {};
|
||||
|
||||
|
||||
// TODO: Not sure if this is the way entities should be validated
|
||||
std::set<EntityId> loggedEntities;
|
||||
template <typename... Components>
|
||||
bool ValidateEntity(Entity entity)
|
||||
{
|
||||
if (entity && entity.HasComponents<Components...>())
|
||||
{
|
||||
loggedEntities.erase(entity);
|
||||
return true;
|
||||
}
|
||||
if (loggedEntities.find(entity) == loggedEntities.end())
|
||||
CP_WARN("Invalid Entity");
|
||||
loggedEntities.emplace(entity);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user