Minor - ECS implementation pt.2 - V12.3.0
This commit is contained in:
@@ -175,7 +175,7 @@ public:
|
||||
|
||||
private:
|
||||
bool render(float, float, float, float, float);
|
||||
bool render_physics(bool key_left, bool key_right, bool key_up, bool key_down, float delta_time);
|
||||
bool render_physics(float delta_time);
|
||||
bool update_mouse_strings(int, int, bool);
|
||||
bool update_fps();
|
||||
bool update_render_count_string(int);
|
||||
|
||||
@@ -54,6 +54,18 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Obtenir toutes les entit<69>s
|
||||
std::vector<std::shared_ptr<Entity>> GetAllEntities() {
|
||||
std::vector<std::shared_ptr<Entity>> result;
|
||||
result.reserve(m_Entities.size());
|
||||
|
||||
for (const auto& [id, entity] : m_Entities) {
|
||||
result.push_back(entity);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Obtenir toutes les entit<69>s qui ont un composant sp<73>cifique
|
||||
template<typename T>
|
||||
std::vector<std::shared_ptr<Entity>> GetEntitiesWithComponent() {
|
||||
|
||||
Reference in New Issue
Block a user