sonic-radiance/sonic-radiance.love/game/loot.lua

32 lines
686 B
Lua
Raw Normal View History

2020-08-02 15:56:36 +02:00
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