diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-03 19:54:10 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-03 19:54:10 +0200 |
commit | db0d49b4a41a36b47979d0935316c26ae77c260a (patch) | |
tree | fd1e5a6b7ff261fc8ddfded8c2607e5b75a43e0b /not | |
parent | 10ad4ebb8db9bcc43c5517d95cfe668c6d6abc4c (diff) | |
download | roflnauts-db0d49b4a41a36b47979d0935316c26ae77c260a.zip roflnauts-db0d49b4a41a36b47979d0935316c26ae77c260a.tar.gz roflnauts-db0d49b4a41a36b47979d0935316c26ae77c260a.tar.bz2 |
Moved default variables to constructor in Element
Diffstat (limited to 'not')
-rw-r--r-- | not/Element.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/not/Element.lua b/not/Element.lua index 24576e6..6ac83d6 100644 --- a/not/Element.lua +++ b/not/Element.lua @@ -1,15 +1,11 @@ -require "not.Object" - --- `Element` -- Empty element used inside `Menu`. -Element = Object:extends() - -Element.parent = --[[not.Menu]]nil -Element.x = 0 -Element.y = 0 +Element = require "not.Object":extends() function Element:new (parent) self.parent = parent + self.x = 0 + self.y = 0 end function Element:delete () end -- deletes Element |