From 1245d7635d744aeb3c402433f98bfacde2d81ed0 Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 1 Sep 2021 11:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E7=81=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FourElementMonsterCampPanel.prefab | 4 ++-- .../MonsterCamp/FourElementMonsterCampPanel.lua | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/MonsterCamp/FourElementMonsterCampPanel.prefab b/Assets/ManagedResources/Prefabs/UI/MonsterCamp/FourElementMonsterCampPanel.prefab index 4245b8f88f..aac29b1652 100644 --- a/Assets/ManagedResources/Prefabs/UI/MonsterCamp/FourElementMonsterCampPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/MonsterCamp/FourElementMonsterCampPanel.prefab @@ -13522,7 +13522,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: -165.1001} - m_SizeDelta: {x: 0, y: -375.19995} + m_SizeDelta: {x: 0, y: -379.9} m_Pivot: {x: 0.49999997, y: 1} --- !u!1 &8938437714082590465 GameObject: @@ -13561,7 +13561,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 3.44, y: 25} + m_AnchoredPosition: {x: 3.44, y: 3} m_SizeDelta: {x: 325.92, y: 126.69} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8938437714082590474 diff --git a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/FourElementMonsterCampPanel.lua b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/FourElementMonsterCampPanel.lua index b9ae7e8971..602eae03d9 100644 --- a/Assets/ManagedResources/~Lua/Modules/MonsterCamp/FourElementMonsterCampPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/MonsterCamp/FourElementMonsterCampPanel.lua @@ -37,7 +37,7 @@ function FourElementMonsterCampPanel:InitComponent() local rootHight = this.grid.transform.rect.height local width = this.grid.transform.rect.width this.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.grid.transform, - this.pre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(40, 10)) + this.pre, nil, Vector2.New(width, rootHight), 1, 1, Vector2.New(0, 0)) this.scrollView.moveTween.MomentumAmount = 1 this.scrollView.moveTween.Strength = 2 @@ -191,12 +191,13 @@ function this.InitMonsterShow() local tempData = this.SingleDataShow(go, monsterInfo[index]) this.singledataList[monsterInfo[index].wave] = tempData --this.singlePreList[go] = this.singledataList[monsterInfo[index].wave] - end,true,true) - if MonsterCampManager.CurOffsetIndex < 0 then - this.scrollView:SetIndex((#monsterInfo-trailData.monsterWave-2)) - else - this.scrollView:SetIndex((#monsterInfo-MonsterCampManager.CurOffsetIndex-2)) - end + end,true,true) + this.scrollView:SetIndex(#monsterInfo - curwaves - 1) + -- if MonsterCampManager.CurOffsetIndex < 0 then + -- this.scrollView:SetIndex((#monsterInfo-trailData.monsterWave-2)) + -- else + -- this.scrollView:SetIndex((#monsterInfo-MonsterCampManager.CurOffsetIndex-2)) + -- end end --界面关闭时调用(用于子类重写)