From 4e69182a6d36966847430f01b440a9cdac0e4cdc Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 11 Jul 2017 01:21:31 +0200 Subject: Moved scene managment to SceneManager (non-existant) --- main.lua | 12 +----------- not/SceneManager.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 not/SceneManager.lua diff --git a/main.lua b/main.lua index ba1bfca..6028c84 100644 --- a/main.lua +++ b/main.lua @@ -1,17 +1,6 @@ --- Roflnauts 2 -- TODO: Any lua source file in root directory that is not `main` (this file), `conf` should be moved to a proper directory. Its name should be changed to show what it contains. --- Pretend you didn't see this --- This is work for scene manager --- TODO: Create SceneManager or similar class. -Scene = nil -function changeScene (scene) - if Scene ~= nil then - Scene:delete() - end - Scene = scene -end - -- Should be moved to scene/camera -- TODO: move following functions to `Camera`. function getScale () @@ -24,6 +13,7 @@ end -- Require require "iconsList" +require "not.SceneManager" require "not.World" require "not.Camera" require "not.Menu" diff --git a/not/SceneManager.lua b/not/SceneManager.lua new file mode 100644 index 0000000..0a6cb4b --- /dev/null +++ b/not/SceneManager.lua @@ -0,0 +1,10 @@ +-- Pretend you didn't see this +-- This is work for scene manager +-- TODO: Create SceneManager or similar class. +Scene = nil +function changeScene (scene) + if Scene ~= nil then + Scene:delete() + end + Scene = scene +end -- cgit v1.1