【轩辕宝镜】通关到最后一层,打开界面时列表位置没有固定在最新关
parent
d10d2f976a
commit
e901bd9d3b
|
@ -145,13 +145,17 @@ function this:SwitchView(isNotAni)
|
|||
table.insert(list, go)
|
||||
end
|
||||
,true,isNotAni)
|
||||
local t = 1
|
||||
local t = 0
|
||||
for k,v in ipairs(dataList) do
|
||||
if v.state == 1 then
|
||||
t = k
|
||||
break
|
||||
end
|
||||
end
|
||||
-- t = 0说明没有找到可以挑战的关卡,也就是全部通关了
|
||||
if t <= 0 then
|
||||
t = #dataList
|
||||
end
|
||||
this.ScrollView:SetIndex(t - 1 < 1 and 1 or (t - 1))
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue