epervier-old/gamecore/modules/gamesystem/submodule.lua
2019-07-24 10:43:22 +02:00

23 lines
387 B
Lua

local SubModule = Object:extend()
function SubModule:new(game, name)
self.name = name or error("SUBMODULE must have a name")
self.game = game
self.data = {}
self:register()
end
function SubModule:register()
self.game:registerSubmodules(self)
end
function SubModule:getData()
return self.data
end
function SubModule:setData(data)
self.data = data
end
return SubModule