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() diff --git a/Assets/Scripts/Editor/OptTools/TextureOptTools.cs b/Assets/Scripts/Editor/OptTools/TextureOptTools.cs index 9728995179..9dfb541849 100644 --- a/Assets/Scripts/Editor/OptTools/TextureOptTools.cs +++ b/Assets/Scripts/Editor/OptTools/TextureOptTools.cs @@ -26,8 +26,10 @@ namespace LJ_OptTools var oHeight = tex.height; if (oWidth <= 0 || oHeight <= 0) return false; - var tarW = (oWidth / 4 + ((oWidth % 4 > 0) ? 1 : 0)) * 4; - var tarH = (oHeight / 4 + ((oHeight % 4 > 0) ? 1 : 0)) * 4; + var tarW = (int)Mathf.Pow(2, Mathf.Ceil(Mathf.Log(oWidth, 2))); + var tarH = (int)Mathf.Pow(2, Mathf.Ceil(Mathf.Log(oHeight, 2))); + //var tarW = (oWidth / 4 + ((oWidth % 4 > 0) ? 1 : 0)) * 4; + //var tarH = (oHeight / 4 + ((oHeight % 4 > 0) ? 1 : 0)) * 4; return oWidth != tarW || oHeight != tarH; } @@ -60,8 +62,11 @@ namespace LJ_OptTools #endregion //图片大小调整为4的整数倍 - var tarW = (oWidth / 4 + ((oWidth % 4 > 0) ? 1 : 0)) * 4; - var tarH = (oHeight / 4 + ((oHeight % 4 > 0) ? 1 : 0)) * 4; + //var tarW = (oWidth / 4 + ((oWidth % 4 > 0) ? 1 : 0)) * 4; + //var tarH = (oHeight / 4 + ((oHeight % 4 > 0) ? 1 : 0)) * 4; + + var tarW = (int) Mathf.Pow(2, Mathf.Ceil(Mathf.Log(oWidth, 2))); + var tarH = (int) Mathf.Pow(2, Mathf.Ceil(Mathf.Log(oHeight, 2))); ret.width = tarW; ret.height = tarH;