From 9f59cb3b64ea335583d09dd55bc63e51a93d9ccc Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Wed, 27 Oct 2021 17:04:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A5=9E=E9=AD=82=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/RoleInfo/RoleGodSoulLayout.prefab | 79 ++++++++++++++++++- .../Prefabs/UI/RoleInfo/RoleInfoPanel.prefab | 2 +- .../~Lua/Common/GlobalDefine.lua | 1 + .../~Lua/Modules/GodSoul/GodSoulManager.lua | 12 +-- .../HandBook/HandBookHeroInfoPanel.lua | 11 ++- .../~Lua/Modules/Hero/HeroManager.lua | 7 +- .../Modules/RoleInfo/RoleGodSoulLayout.lua | 4 + .../~Lua/Modules/RoleInfo/RoleInfoPanel.lua | 17 ++-- 8 files changed, 113 insertions(+), 20 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleGodSoulLayout.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleGodSoulLayout.prefab index 546220ecdb..e9919828cb 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleGodSoulLayout.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleGodSoulLayout.prefab @@ -108,7 +108,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0.000066322995} + m_AnchoredPosition: {x: 0, y: 0.00009080592} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &3981280066466389833 @@ -1387,7 +1387,8 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] + m_Children: + - {fileID: 8264125815860833607} m_Father: {fileID: 7083992215520858126} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1770,3 +1771,77 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 +--- !u!1 &8813957597781619434 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8264125815860833607} + - component: {fileID: 6834960053390615} + - component: {fileID: 6115428973203275401} + m_Layer: 5 + m_Name: red + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8264125815860833607 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8813957597781619434} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 7026640070725781074} + m_RootOrder: 0 + 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: 24.25, y: 24.75} + m_SizeDelta: {x: 18.5, y: 18.5} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6834960053390615 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8813957597781619434} + m_CullTransparentMesh: 0 +--- !u!114 &6115428973203275401 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8813957597781619434} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab index 0478538ccd..694fce0606 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleInfoPanel.prefab @@ -24893,7 +24893,7 @@ MonoBehaviour: - initV3: {x: -723, y: -35.05005, z: 0} initFloat: 0 isInit: 1 - changeV3: {x: 6, y: -35.05005, z: 0} + changeV3: {x: 0, y: -35.05005, z: 0} changeFloat: 0 duration: 0.5 delay: 0 diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 8b0190f985..bdf04644a7 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -1562,6 +1562,7 @@ FUNCTION_OPEN_TYPE = { QIJIESHILIAN = 112,--七界试炼 FOURQUADRANT=113,--四象心法 PLAYER_SKILL = 115, --主角技能 + shenhun = 116, } TaskGetBtnIconDef = { diff --git a/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua b/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua index 3ca2588cf1..f5bad05b29 100644 --- a/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/GodSoul/GodSoulManager.lua @@ -222,11 +222,13 @@ end --检测红点 function this.CheckRedPointGodSoul(curHeroData) - if curHeroData.heroConfig.IsSoulOpen == 1 then - return true + if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.shenhun) + or curHeroData.heroConfig.IsSoulOpen == 0 or curHeroData.star < 11 then + return false end local lv = this.GetGodSoulLv(curHeroData.dynamicId) - return this.CheckCanUpGodSoul(curHeroData,lv + 1) + local isShow = this.CheckCanUpGodSoul(curHeroData,lv + 1) or false + return isShow end --筛选符合条件的所有神将 @@ -330,9 +332,9 @@ function this.CheckCanUpGodSoul(curHeroData,lv,datas) return isAll,enoughData,enoughDatas end if godData then - for k,v in pairs(godDatas) do + for k,v in pairs(godDatas) do local isChoosed = this.CheckExistBindHeroDataByDid(curHeroData.dynamicId,v.dynamicId) - if isChoosed and isChoosed ~= lv then + if isChoosed and isChoosed ~= lv and isChoosed > 0 then else for j = 1,#godData do if v.star >= godData[j].star then diff --git a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua index 2f040b0294..7ea0440339 100644 --- a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroInfoPanel.lua @@ -243,7 +243,9 @@ function this:UpdateHeroInfoData() _CurPageIndex = RoleInfoPanelIndex.qingbao end elseif _CurPageIndex == RoleInfoPanelIndex.shenhun then - if heroConFigData.IsSoulOpen == 0 then + if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.shenhun) + and heroConFigData.IsSoulOpen == 1 and _curStar > 10 then + else _CurPageIndex = RoleInfoPanelIndex.qingbao end end @@ -284,10 +286,11 @@ function HandBookHeroInfoPanel:UpdateBtnList() tabsList[k].gameObject:SetActive(false) end elseif k == RoleInfoPanelIndex.shenhun then - if heroConFigData.IsSoulOpen == 0 then - tabsList[k].gameObject:SetActive(false) + if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.shenhun) + and heroConFigData.IsSoulOpen == 1 and _curStar > 10 then + tabsList[k].gameObject:SetActive(true) else - tabsList[k].gameObject:SetActive(true) + tabsList[k].gameObject:SetActive(false) end else tabsList[k].gameObject:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua index aae1139822..68f7c315f7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Hero/HeroManager.lua @@ -2887,8 +2887,8 @@ function this.GetFormationHeroRedPoint() this.GetIsShowTalismanRedPoint(curHeroData) or (isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0) or HeroManager.CheckIsUpTreasure(curHeroData.jewels[1],0) or - HeroManager.CheckIsUpTreasure(curHeroData.jewels[2],0) - + HeroManager.CheckIsUpTreasure(curHeroData.jewels[2],0) or + GodSoulManager.CheckRedPointGodSoul(curHeroData) then return true end @@ -2937,7 +2937,8 @@ function this.GetCurHeroIsShowRedPoint(curHeroData) this.GetIsShowTalismanRedPoint(curHeroData) or (#this.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0 and isCanUpEquipTreasure) or HeroManager.CheckIsUpTreasure(curHeroData.jewels[1],0) or - HeroManager.CheckIsUpTreasure(curHeroData.jewels[2],0) + HeroManager.CheckIsUpTreasure(curHeroData.jewels[2],0) or + GodSoulManager.CheckRedPointGodSoul(curHeroData) end --获取当前英雄的下一突破 和 升星 静态数据 function this.GetCurHeroUpLvOrUpStarSData(curHeroData) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua index 285f97a0e0..d20fd80b6f 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleGodSoulLayout.lua @@ -81,6 +81,8 @@ function RoleGodSoulLayout:UpdateGodList() self.gridList[i].costGrid = Util.GetGameObject(self.gridList[i].go,"middle/costGrid") self.gridList[i].costList = {} self.gridList[i].add = Util.GetGameObject(self.gridList[i].go,"add") + self.gridList[i].red = Util.GetGameObject(self.gridList[i].add,"red") + self.gridList[i].red.gameObject:SetActive(false) self.gridList[i].des = Util.GetGameObject(self.gridList[i].go,"bottom/des"):GetComponent("Text") end self.gridList[i].go.gameObject:SetActive(true) @@ -161,6 +163,8 @@ function RoleGodSoulLayout:UpdataSingleGod(index) Util.SetGray(self.gridList[index].godGrid,true) --勾魂图标 未激活时置灰 --Util.SetGray(self.gridList[index].des.gameObject,true) self.gridList[index].des.text = string.format("%s",self.godDatas[index].skill) --神魂效果 绿色 未激活时置灰 + local isShow = GodSoulManager.CheckCanUpGodSoul(self.curHeroData,index) or false + self.gridList[index].red.gameObject:SetActive(isShow) else Util.SetGray(self.gridList[index].godGrid,false) --Util.SetGray(self.gridList[index].des.gameObject,false) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua index f764e6366d..1a6d41dc55 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleInfoPanel.lua @@ -442,16 +442,21 @@ function this:UpdateBtnList() elseif k == RoleInfoPanelIndex.jinjie then if curHeroData.star < 10 then tabsList[k].gameObject:SetActive(true) + else + tabsList[k].gameObject:SetActive(false) end elseif k == RoleInfoPanelIndex.juexing then if curHeroData.star == 10 and curHeroData.heroConfig.MaxRank > curHeroData.star and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.RoleAwake) then tabsList[k].gameObject:SetActive(true) + else + tabsList[k].gameObject:SetActive(false) end elseif k == RoleInfoPanelIndex.shenhun then - if curHeroData.heroConfig.IsSoulOpen == 0 then - tabsList[k].gameObject:SetActive(false) - else + if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.shenhun) + and curHeroData.heroConfig.IsSoulOpen == 1 and curHeroData.star > 10 then tabsList[k].gameObject:SetActive(true) + else + tabsList[k].gameObject:SetActive(false) end else tabsList[k].gameObject:SetActive(true) @@ -548,7 +553,7 @@ function this:UpdateHeroInfoData() end elseif _CurPageIndex == RoleInfoPanelIndex.jinjie then if (curHeroData.star == 10 and curHeroData.heroConfig.MaxRank > curHeroData.star and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.RoleAwake)) - or (not curHeroData.star < 10) then + or (not (curHeroData.star < 10)) then _CurPageIndex = 1 end elseif _CurPageIndex == RoleInfoPanelIndex.juexing then @@ -557,7 +562,9 @@ function this:UpdateHeroInfoData() _CurPageIndex = 1 end elseif _CurPageIndex == RoleInfoPanelIndex.shenhun then - if curHeroData.heroConfig.IsSoulOpen == 0 then + if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.shenhun) + and curHeroData.heroConfig.IsSoulOpen == 1 and curHeroData.star > 10 then + else _CurPageIndex = 1 end end