PGRData/Script/matrix/xentity/xgoldenminer/settle/XGoldenMinerItemChangeInfo.lua
2024-09-01 22:49:41 +02:00

41 lines
No EOL
936 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local type = type
--道具栏变更状态同步
---@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