summaryrefslogtreecommitdiffhomepage
path: root/not/SceneManager.lua
blob: 367a4c09a1635f231616a83dbeda3c2f7ca28dfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- `SceneManager`
-- Used for changing single active scene.
-- TODO: Extend functionality for more than one active scene (eg. overlay menu).
SceneManager = require "not.Object":extends()

function SceneManager:changeScene (scene)
	if self.scene ~= nil then
		self.scene:delete()
	end
	self.scene = scene
end

function SceneManager:getScene ()
	return self.scene
end

return SceneManager