summaryrefslogtreecommitdiffhomepage
path: root/not/Element.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-08-13 02:26:55 +0200
committerAki <nthirtyone@gmail.com>2017-08-13 02:26:55 +0200
commitb1cf14d64a2d3e28683db87190c4b2c7799c259d (patch)
treee45dac5cc6ce5265e3e3e2c914eb7cc92a820b8b /not/Element.lua
parent0dd01913fe0eefc7ba4bc0797877f40fdedf9315 (diff)
parented62b573417bdc85bec616f6016846b02de4c906 (diff)
downloadroflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.zip
roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.tar.gz
roflnauts-b1cf14d64a2d3e28683db87190c4b2c7799c259d.tar.bz2
Merge branch 'multi'maps
Diffstat (limited to 'not/Element.lua')
-rw-r--r--not/Element.lua16
1 files changed, 7 insertions, 9 deletions
diff --git a/not/Element.lua b/not/Element.lua
index e6d91da..24576e6 100644
--- a/not/Element.lua
+++ b/not/Element.lua
@@ -1,17 +1,15 @@
+require "not.Object"
+
--- `Element`
-- Empty element used inside `Menu`.
-Element = {
- parent = --[[not.Menu]]nil,
- x = 0,
- y = 0
-}
+Element = Object:extends()
-Element.__index = Element
+Element.parent = --[[not.Menu]]nil
+Element.x = 0
+Element.y = 0
function Element:new (parent)
- local o = setmetatable({}, self)
- o.parent = parent
- return o
+ self.parent = parent
end
function Element:delete () end -- deletes Element