mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add test.close_world(bool)
This commit is contained in:
parent
9b4dd8f65e
commit
d3f74b56fa
8 changed files with 30 additions and 11 deletions
|
|
@ -38,5 +38,11 @@ void TestMainloop::run() {
|
|||
}
|
||||
|
||||
void TestMainloop::setLevel(std::unique_ptr<Level> level) {
|
||||
this->controller = std::make_unique<LevelController>(&engine, std::move(level));
|
||||
if (level == nullptr) {
|
||||
controller->onWorldQuit();
|
||||
engine.getPaths()->setCurrentWorldFolder(fs::path());
|
||||
controller = nullptr;
|
||||
} else {
|
||||
controller = std::make_unique<LevelController>(&engine, std::move(level));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue