灵兽羁绊提交

jiaoyangna 2020-11-04 23:00:32 +08:00
parent e9f42ce609
commit a39bc32ef6
1 changed files with 6 additions and 4 deletions

View File

@ -36,18 +36,19 @@ end
function this.ShowPokemonFetterData() function this.ShowPokemonFetterData()
local curGetAllPokemonFetter = PokemonManager.GetAllPokemonFetterDatas() local curGetAllPokemonFetter = PokemonManager.GetAllPokemonFetterDatas()
LogBlue("#羁绊个数:"..#curGetAllPokemonFetter)
for i,v in ipairs(curGetAllPokemonFetter) do
LogGreen("v.id:"..v.id.." v.enabled:"..v.enabled)
end
curPokemonSidList = PokemonManager.GetAllPokemonGetDatas() curPokemonSidList = PokemonManager.GetAllPokemonGetDatas()
LogGreen("#curPokemonSidList:"..LengthOfTable(curPokemonSidList)) LogGreen("#curPokemonSidList:"..LengthOfTable(curPokemonSidList))
table.sort(curGetAllPokemonFetter, function(a,b) table.sort(curGetAllPokemonFetter, function(a,b)
if a.enabled == b.enabled then if a.enabled == b.enabled then
return a.id < b.id return a.id < b.id
else else
return a.enabled > b.enabled return a.enabled < b.enabled
end end
end) end)
for k,v in pairs(fetterPreList) do
v.gameObject:SetActive(false)
end
this.sv:SetData(curGetAllPokemonFetter, function(dataIndex, go) this.sv:SetData(curGetAllPokemonFetter, function(dataIndex, go)
this.SingleItemDataShow(go,curGetAllPokemonFetter[dataIndex]) this.SingleItemDataShow(go,curGetAllPokemonFetter[dataIndex])
table.insert(fetterPreList,go) table.insert(fetterPreList,go)
@ -157,6 +158,7 @@ function this:OnDestroy()
fetterPreList = {} fetterPreList = {}
fetterPreItemList = {} fetterPreItemList = {}
fetterPreAddList = {} fetterPreAddList = {}
this.sv = {}
end end
return this return this