32 lines
686 B
Lua
32 lines
686 B
Lua
|
local LootManager = Object:extend()
|
||
|
|
||
|
function LootManager:new(controller)
|
||
|
self.controller = controller
|
||
|
self.rings = 0
|
||
|
self.inventory = {}
|
||
|
self.materials = {}
|
||
|
self.chaosDrives = {}
|
||
|
self.animals = {}
|
||
|
end
|
||
|
|
||
|
function LootManager:getData()
|
||
|
local data = {}
|
||
|
data.rings = self.rings
|
||
|
data.inventory = self.inventory
|
||
|
data.materials = self.materials
|
||
|
data.chaosDrives = self.chaosDrives
|
||
|
data.animals = self.animals
|
||
|
return data
|
||
|
end
|
||
|
|
||
|
function LootManager:setData(data)
|
||
|
local data = data
|
||
|
self.rings = data.rings
|
||
|
self.inventory = data.inventory
|
||
|
self.materials = data.materials
|
||
|
self.chaosDrives = data.chaosDrives
|
||
|
self.animals = data.animals
|
||
|
end
|
||
|
|
||
|
return LootManager
|