mirror of
https://gitlab.com/voidframe/voidframe-cpp.git
synced 2026-06-28 18:15:16 -04:00
Add World::Update()
This commit is contained in:
@@ -11,6 +11,8 @@ public:
|
||||
Entity *Spawn();
|
||||
void Destroy(Entity *entity);
|
||||
|
||||
void Update();
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<Entity>> entities;
|
||||
};
|
||||
|
||||
@@ -18,3 +18,9 @@ void World::Destroy(Entity *entity) {
|
||||
return entityPtr.get() == entity;
|
||||
}));
|
||||
}
|
||||
|
||||
void World::Update() {
|
||||
for (auto &entity : entities) {
|
||||
entity->Update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user