diff options
author | Aki <nthirtyone@gmail.com> | 2017-07-12 16:00:51 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-07-12 16:00:51 +0200 |
commit | 9af261cd204b999e6b2b5a44d5c5eb768f84c49d (patch) | |
tree | b5465cd344f01329c0d027b5345a23e15e1e2bc7 /not/Scene.lua | |
parent | 6c6e2fe6ec84ec57f6336fa9d6e4136c0e1c9513 (diff) | |
download | roflnauts-9af261cd204b999e6b2b5a44d5c5eb768f84c49d.zip roflnauts-9af261cd204b999e6b2b5a44d5c5eb768f84c49d.tar.gz roflnauts-9af261cd204b999e6b2b5a44d5c5eb768f84c49d.tar.bz2 |
Created Scene class
extended SceneManager a little bit to support multiple scenes
Diffstat (limited to 'not/Scene.lua')
-rw-r--r-- | not/Scene.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/not/Scene.lua b/not/Scene.lua new file mode 100644 index 0000000..c770fe4 --- /dev/null +++ b/not/Scene.lua @@ -0,0 +1,32 @@ +--- `Scene` +Scene = require "not.Object":extends() + +function Scene:new () + self.sleeping = false + self.hidden = false + self.inputDisabled = false +end + +-- Following setters and getters are a little bit too much, I think. But they do follow general coding directions. +function Scene:setSleeping (sleeping) + self.sleeping = sleeping +end +function Scene:isSleeping () + return self.sleeping +end + +function Scene:setHidden (hidden) + self.hidden = hidden +end +function Scene:isHidden () + return self.hidden +end + +function Scene:setInputDisabled (inputDisabled) + self.inputDisabled = inputDisabled +end +function Scene:isInputDisabled () + return self.inputDisabled +end + +return Scene |