Make Level class to unload scenes in reversed order
This commit is contained in:
@@ -903,12 +903,11 @@ bool LevelImpl::unloadScene(Scene* scene)
|
|||||||
bool LevelImpl::unloadScenes()
|
bool LevelImpl::unloadScenes()
|
||||||
{
|
{
|
||||||
auto scenes = Level::Scenes;
|
auto scenes = Level::Scenes;
|
||||||
for (int32 i = 0; i < scenes.Count(); i++)
|
for (int32 i = scenes.Count() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
if (unloadScene(scenes[i]))
|
if (unloadScene(scenes[i]))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user