feat: add a callback to restored scenes

This commit is contained in:
Kazhnuz 2021-04-02 22:24:37 +02:00
parent d611f3214c
commit c8204f044f
2 changed files with 5 additions and 0 deletions

View file

@ -56,6 +56,10 @@ function Scene:clear()
-- TODO: send automatic cleanups to the different elements of the scene -- TODO: send automatic cleanups to the different elements of the scene
end end
function Scene:restored()
end
-- UPDATE FUNCTIONS -- UPDATE FUNCTIONS
-- Handle stuff that happens every steps -- Handle stuff that happens every steps

View file

@ -54,6 +54,7 @@ function SceneManager:setStoredScene(name)
if storedScene ~= nil then if storedScene ~= nil then
self.currentScene = storedScene self.currentScene = storedScene
self.storage[name] = nil self.storage[name] = nil
self.currentScene:restored()
end end
end end