Better scene management.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include "Engine/Level/Scene.h"
|
||||
#include <Engine/Level/Scene.h>
|
||||
|
||||
bool Scene::EntityListContains(const Entity* entity) const {
|
||||
for (auto* e : EntityList)
|
||||
@@ -47,6 +47,18 @@ Scene::~Scene() {
|
||||
|
||||
for (auto* e : EntityList)
|
||||
delete e;
|
||||
|
||||
delete HeadsUpDisplay;
|
||||
}
|
||||
|
||||
void Scene::Unload() {
|
||||
for (auto* f : FixedList)
|
||||
delete f;
|
||||
|
||||
for (auto* e : EntityList)
|
||||
delete e;
|
||||
|
||||
delete HeadsUpDisplay;
|
||||
}
|
||||
|
||||
void Scene::AppendEntity(Entity* entity) {
|
||||
@@ -84,3 +96,7 @@ void Scene::RemoveFixed(Fixed* fixed) {
|
||||
FixedList.erase(it);
|
||||
}
|
||||
|
||||
std::string Scene::GetName() const {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user