sonic-radiance/sonic-radiance.love/core/modules/gamesystem/submodule.lua

24 lines
387 B
Lua
Raw Permalink Normal View History

2019-07-26 16:46:43 +02:00
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