feat: add a way to know if a scene is stored

This commit is contained in:
Kazhnuz 2021-03-26 15:27:23 +01:00
parent 2ad4cf8182
commit f12074d659

View file

@ -41,6 +41,10 @@ function SceneManager:setScene(scene)
self.nextScene = scene self.nextScene = scene
end end
function SceneManager:haveStoredScene(name)
return (self.storage[name] ~= nil)
end
function SceneManager:storeCurrentScene(name) function SceneManager:storeCurrentScene(name)
self.storage[name] = self.currentScene self.storage[name] = self.currentScene
end end