Added error handling in wren. Game while abort lauching and print error in logger

This commit is contained in:
Antoine Pilote
2021-07-03 18:31:32 -04:00
parent f5bcb12f61
commit b384154eb4
14 changed files with 50 additions and 22 deletions

View File

@@ -76,16 +76,22 @@ Entity Scene::GetEntityByID(int id)
}
}
void Scene::OnInit()
bool Scene::OnInit()
{
for (auto& system : m_Systems)
system->Init();
if(!system->Init())
{
return false;
}
return true;
}
void Scene::OnExit()
{
for (auto& system : m_Systems)
system->Exit();
}
void Scene::Update(Timestep ts)