PGRData/Script/matrix/xentity/xgoldenminer/settle/XGoldenMinerItemChangeInfo.lua

41 lines
936 B
Lua
Raw Normal View History

local type = type
--道具栏变更状态同步
2024-09-01 20:49:41 +00:00
---@class XGoldenMinerItemChangeInfo
local XGoldenMinerItemChangeInfo = XClass(nil, "XGoldenMinerItemChangeInfo")
local Default = {
_ItemId = 0,
_Status = 1, --变更状态1消耗2获得
_GridIndex = 0, --格子位置
}
function XGoldenMinerItemChangeInfo:Ctor()
for key, value in pairs(Default) do
if type(value) == "table" then
self[key] = {}
else
self[key] = value
end
end
end
function XGoldenMinerItemChangeInfo:UpdateData(data)
self._ItemId = data.ItemId
self._Status = data.Status
self._GridIndex = data.GridIndex
end
function XGoldenMinerItemChangeInfo:GetItemId()
return self._ItemId
end
function XGoldenMinerItemChangeInfo:GetStatus()
return self._Status
end
function XGoldenMinerItemChangeInfo:GetGridIndex()
return self._GridIndex
end
return XGoldenMinerItemChangeInfo