【ID1008672】

【逍遥游优化】解锁上方的地图后,进入选择界面默认滚动至相应的入口位置
dev_chengFeng
jiaoyangna 2021-04-06 17:42:02 +08:00
parent eac03c7d20
commit 04721fe715
2 changed files with 8 additions and 1 deletions

View File

@ -29,6 +29,7 @@ end
function this.GetOpenMapData(func)
NetManager.JourneyGetInfoResponse(function (msg)
local _data={}
LogGreen("#msg.infos:"..#msg.infos)
for i = 1, #msg.infos do
_data[msg.infos[i].mapId]={}
_data[msg.infos[i].mapId].process=msg.infos[i].process

View File

@ -130,7 +130,13 @@ function this.ScrollToBottom()
local dheight = cheight - vheight
-- 判断滚动到最下面的条件
local pos = this.content.transform.anchoredPosition3D
this.content.transform.anchoredPosition3D = Vector3(pos.x, dheight, 0)
LogGreen("#data:"..LengthOfTable(XiaoYaoManager.allMapData))
if LengthOfTable(XiaoYaoManager.allMapData) >= 7 then
this.content.transform.anchoredPosition3D = Vector3(pos.x, 0, 0)
else
this.content.transform.anchoredPosition3D = Vector3(pos.x, dheight, 0)
end
end
--刷新每一条的显示数据