diff --git a/Assets/ManagedResources/Atlas/HomeLandAtlas/homelandBg.png b/Assets/ManagedResources/Atlas/HomeLandAtlas/homelandBg.png deleted file mode 100644 index 7111c20139..0000000000 Binary files a/Assets/ManagedResources/Atlas/HomeLandAtlas/homelandBg.png and /dev/null differ diff --git a/Assets/ManagedResources/Atlas/HomeLandAtlas/homeland_circle.png b/Assets/ManagedResources/Atlas/HomeLandAtlas/homeland_circle.png new file mode 100644 index 0000000000..e8f9e2919a Binary files /dev/null and b/Assets/ManagedResources/Atlas/HomeLandAtlas/homeland_circle.png differ diff --git a/Assets/ManagedResources/Atlas/HomeLandAtlas/homelandBg.png.meta b/Assets/ManagedResources/Atlas/HomeLandAtlas/homeland_circle.png.meta similarity index 96% rename from Assets/ManagedResources/Atlas/HomeLandAtlas/homelandBg.png.meta rename to Assets/ManagedResources/Atlas/HomeLandAtlas/homeland_circle.png.meta index 4cce936b28..3076899c87 100644 --- a/Assets/ManagedResources/Atlas/HomeLandAtlas/homelandBg.png.meta +++ b/Assets/ManagedResources/Atlas/HomeLandAtlas/homeland_circle.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 038a4b49e189f144e834a7ad8d21b704 +guid: 00ed42e70bd540e4b9471372c153ce17 TextureImporter: fileIDToRecycleName: {} externalObjects: {} @@ -86,7 +86,7 @@ TextureImporter: outline: [] physicsShape: [] bones: [] - spriteID: 5596fc5a8b69ae04a931bd0cc6dd701e + spriteID: 17de797b74750a64a8924e9cf0e24ce6 vertices: [] indices: edges: [] diff --git a/Assets/ManagedResources/Prefabs/UI/HomeLand/HomeLandPanel.prefab b/Assets/ManagedResources/Prefabs/UI/HomeLand/HomeLandPanel.prefab index b446563d94..a9d6a499f4 100644 --- a/Assets/ManagedResources/Prefabs/UI/HomeLand/HomeLandPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/HomeLand/HomeLandPanel.prefab @@ -6729,7 +6729,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -15885,7 +15885,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -16243,7 +16243,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -17945,7 +17945,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -18439,7 +18439,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -19450,7 +19450,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -20165,7 +20165,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 3732d69767bb04c43a14700e8bc55c76, type: 3} + m_Sprite: {fileID: 21300000, guid: 00ed42e70bd540e4b9471372c153ce17, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 diff --git a/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandManager.lua b/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandManager.lua index 2132d5ebfd..707e1f9aa7 100644 --- a/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandManager.lua @@ -45,7 +45,7 @@ end function this.GetServerData(msg,func) if msg.infos and #msg.infos > 0 then for index, value in ipairs(msg.infos) do - LogGreen("Id:"..tostring(value.id).." startTime:"..tostring(TimeStampToDateStr4(value.productionStartTime)).." endTime:"..tostring(TimeStampToDateStr4(value.upLvEndTime))) + -- LogGreen("Id:"..tostring(value.id).." startTime:"..tostring(TimeStampToDateStr4(value.productionStartTime)).." endTime:"..tostring(TimeStampToDateStr4(value.upLvEndTime))) if value.id and value.id > 0 then local data = HomeLandLevel[value.id] if data then @@ -73,7 +73,7 @@ function this.GetServerEquipData(msg,func) if msg.infos and #msg.infos > 0 then for index, value in ipairs(msg.infos) do -- value.lvId = 1022 - LogYellow("Location:"..tostring(value.location).." lvId:"..tostring(value.lvId).." 突破等级Id:"..tostring(this.levelProId)) + -- LogYellow("Location:"..tostring(value.location).." lvId:"..tostring(value.lvId).." 突破等级Id:"..tostring(this.levelProId)) if value.location and value.location > 0 and value.location < 5 then this.EquipData[value.location].Id = value.lvId this.EquipData[value.location].configData = EquipStrengthen[value.lvId] @@ -214,7 +214,7 @@ function this.CheckPrivilege(func) end end - +--==============================红点检测============================== --烦人的红点检测(我决定1-4写一个、5写一个,6写一个、任务写一个、7移植过来,然后写个总的检测跑一遍所有) function this.CheckRedMain() if this.Check1to5Building() then @@ -301,4 +301,25 @@ function this.CheckSingleEquipUpgrade(id) return bool end +--===============设置按钮位置================= +local POS = { + [1] = {Vector3.New(0,110,0)}, + [2] = {Vector3.New(-75,80,0),Vector3.New(75,80,0)}, + [3] = {Vector3.New(0,110,0),Vector3.New(-100,30,0),Vector3.New(100,30,0)}, + [4] = {Vector3.New(55,90,0),Vector3.New(110,0,0),Vector3.New(-55,90,0),Vector3.New(-110,0,0)}, +} +function this.SetButtonPosition(Obj) + local objList = {} + for i = 1, Obj.transform.childCount do + LogRed(tostring(Obj.transform:GetChild(i-1).gameObject.activeInHierarchy)) + if Obj.transform:GetChild(i-1).gameObject.activeInHierarchy then + table.insert(objList,Obj.transform:GetChild(i-1).gameObject) + end + end + -- LogError("#objList"..tostring(#objList)) + for index, value in ipairs(objList) do + value:GetComponent("RectTransform").localPosition = POS[#objList][index] + end +end + return HomeLandManager \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandPanel.lua b/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandPanel.lua index a89d6a553a..639e95bc83 100644 --- a/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HomeLand/HomeLandPanel.lua @@ -118,6 +118,7 @@ function HomeLand:BindEvent() end self.curSelect = i self.mapData[i].Btns:SetActive(true) + HomeLandManager.SetButtonPosition(self.mapData[i].Btns) PlayUIAnim(self.mapData[i].Btns) end end) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HomeLandEquip.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HomeLandEquip.lua index f62ff506aa..44a1d31663 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HomeLandEquip.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_HomeLandEquip.lua @@ -151,6 +151,10 @@ function this:SetData() this.Cost:SetActive(true) this.Tips:SetActive(false) this.costCondition.gameObject:SetActive(false) + --突破的消耗和升级不同 + local cost = EquipRankUp[HomeLandManager.levelProId].Cost + local color2 = BagManager.GetTotalItemNum(cost[1]) >= cost[2] and "#FFEED6" or "red" + this.costNum.text = string.format("%s",color2,cost[2]) end end