From c0c3013e2fd9212f6acaeae2708efad068296b7d Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Wed, 11 Aug 2021 21:21:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A4=A7=E9=97=B9=E5=A4=A9=E5=AE=AB?= =?UTF-8?q?=E3=80=91=E8=A7=92=E8=89=B2=E7=88=AC=E5=A1=94=EF=BC=8C=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E4=B8=8D=E4=BC=9A=E8=B7=9F=E9=9A=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Expedition/ExpeditionMainPanel.lua | 35 +++++++------------ 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua index df25412dc7..ff3e8e6db8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expedition/ExpeditionMainPanel.lua @@ -7,6 +7,7 @@ local timer = Timer.New() -- local npc local GetCurNodeInfo = {}--当前操作层数据 -- local SkeletonGraphic--动画组件 + local isPlayerMove = false--是否在播放人物行走动画 local isAllHaveAttack = false--是否有状态不一致情况 说明不是失败过 就是未领取圣物状态 local nodeGoTable = {} @@ -241,26 +242,14 @@ function ExpeditionMainPanel:OnShowNodeData(isMoveGrid) ExpeditionMainPanel:SingleLayNodeShow(layListGrid[i],curAllLayNodeList[i]) layListGrid[i]:SetActive(true) end - if isMoveGrid then - local gridH = 2746--self.grid:GetComponent("RectTransform").sizeDelta.y - local rectH = 1656--self.grid.transform.parent:GetComponent("RectTransform").sizeDelta.y - local endH = gridH - rectH - local curlay = GetCurNodeInfo.lay - if curlay <= 6 then - local y = endH / 6 - y = endH - (curlay - 1) * y - self.grid:GetComponent("RectTransform").anchoredPosition = Vector3.New(0,y,0) - end - end - --self.ScrollView:SetData(curAllLayNodeList, function (index, go) - -- self:SingleLayNodeShow(go,curAllLayNodeList[index],(#AllLayNodeList - index) + 1) - --end) - --LogError("#AllLayNodeList - GetCurNodeInfo.lay "..#AllLayNodeList - GetCurNodeInfo.lay) - --local curIndex = #AllLayNodeList - GetCurNodeInfo.lay - --if curIndex == 0 then - -- curIndex = curIndex + 1 - --end - --self.ScrollView:SetIndex(curIndex) + local curlay = GetCurNodeInfo.lay + -- local rectH = self.grid.transform.parent:GetComponent("RectTransform").rect.height/2 + -- local y = (#curAllLayNodeList - curlay) * 183.3 + 638.55 - rectH + local rectH = self.grid.transform.parent:GetComponent("RectTransform").rect.height/2 + local y = 2746.5 - ((curlay - 1) * 183.3) - rectH; + + self.grid.transform:DOLocalMove(Vector3.New(0,y,0), 0.5, false):SetEase(Ease.Linear) + -- self.grid:GetComponent("RectTransform").anchoredPosition = Vector3.New(0,y,0) end --实例化每层信息 @@ -706,11 +695,11 @@ function ExpeditionMainPanel:PlayerMoveFun() if targetPosGoAndData.curNodeData.type == ExpeditionNodeType.Shop then NetManager.StoreNodeRequest(targetPosGoAndData.curNodeData.sortId,function () UIManager.OpenPanel(UIName.ExpeditionMonsterInfoPopup,EXPEDITON_POPUP_TYPE.Shop,targetPosGoAndData.curNodeData,3,function () - self:OnShowNodeData() + self:OnShowNodeData(true) end) end) else - self:OnShowNodeData() + self:OnShowNodeData(true) end isPlayerMove = false end, 0.8) @@ -740,7 +729,7 @@ function ExpeditionMainPanel:SelfUpdataPanelShow() end function ExpeditionMainPanel:RefreshManagerData() NetManager.GetExpeditionRequest(ExpeditionManager.expeditionLeve,function () - self:OnShowNodeData() + self:OnShowNodeData(true) end) end function ExpeditionMainPanel:HeroResurgence()