From f12074d659c13fca8e513702ee9f524f94f844a9 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Fri, 26 Mar 2021 15:27:23 +0100 Subject: [PATCH] feat: add a way to know if a scene is stored --- sonic-radiance.love/core/scenemanager.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sonic-radiance.love/core/scenemanager.lua b/sonic-radiance.love/core/scenemanager.lua index 60c5a79..d2b44eb 100644 --- a/sonic-radiance.love/core/scenemanager.lua +++ b/sonic-radiance.love/core/scenemanager.lua @@ -41,6 +41,10 @@ function SceneManager:setScene(scene) self.nextScene = scene end +function SceneManager:haveStoredScene(name) + return (self.storage[name] ~= nil) +end + function SceneManager:storeCurrentScene(name) self.storage[name] = self.currentScene end