PGRData/Script/matrix/xui/xuichesspursuit/xdata/XChessPursuitRankScore.lua

37 lines
No EOL
706 B
Lua

local type = type
local Default = {
Score = 0,
Count = 0,
}
local XChessPursuitRankScore = XClass(nil, "XChessPursuitRankScore")
function XChessPursuitRankScore:Ctor(data)
for key, value in pairs(Default) do
if type(value) == "table" then
self[key] = {}
else
self[key] = value
end
end
self:UpdateData(data)
end
function XChessPursuitRankScore:UpdateData(data)
if not data then
return
end
self.Score = data.Score
self.Count = data.Count
end
function XChessPursuitRankScore:GetScore()
return self.Score
end
function XChessPursuitRankScore:GetCount()
return self.Count
end
return XChessPursuitRankScore