diff --git a/Assets/LuaFramework/Scenes/策划场景.unity b/Assets/LuaFramework/Scenes/策划场景.unity index cd87d5e1a8..cb6d2cbc5e 100644 --- a/Assets/LuaFramework/Scenes/策划场景.unity +++ b/Assets/LuaFramework/Scenes/策划场景.unity @@ -112,41 +112,6 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1 &1071845793 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1071845794} - m_Layer: 5 - m_Name: "\u7ACB\u7ED8\u8BF7\u653E\u8FD9\u91CC\uFF0C \u5927\u5C0F\u8BF7\u8C03\u6574\u6211\u786E\u5B9A" - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1071845794 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1071845793} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0.45, y: 0.45, z: 1} - m_Children: [] - m_Father: {fileID: 462259303512664307} - 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: -1.1, y: -76.8} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &1133079358 GameObject: m_ObjectHideFlags: 0 @@ -1673,14 +1638,13 @@ 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: - - {fileID: 1071845794} + m_Children: [] m_Father: {fileID: 5490285290452042586} 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: 26.6, y: -162.1} + m_AnchoredPosition: {x: 0, y: -120} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!224 &484367328498137730 @@ -22501,7 +22465,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: 6.88, y: 130.4} + m_AnchoredPosition: {x: 0, y: 125} m_SizeDelta: {x: 221.93, y: 548.78} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5499537129101667573 @@ -25950,7 +25914,7 @@ GameObject: m_Component: - component: {fileID: 462259303512664307} m_Layer: 5 - m_Name: "\u70B9\u5F00\u6211\uFF0C\u4F4D\u7F6E\u8BF7\u8C03\u6574\u6211\u786E\u5B9A" + m_Name: "\u7ACB\u7ED8\u653E\u5728\u8FD9\u91CC" m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 diff --git a/Assets/ManagedResources/Prefabs/UI/Compound/CompoundPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Compound/CompoundPanel.prefab index 644636a0cb..85dbf1854b 100644 --- a/Assets/ManagedResources/Prefabs/UI/Compound/CompoundPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Compound/CompoundPanel.prefab @@ -3169,7 +3169,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: 259, y: 303} + m_AnchoredPosition: {x: 284, y: 303} m_SizeDelta: {x: 203.89, y: 203.89} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &313656261710327451 diff --git a/Assets/ManagedResources/Prefabs/UI/Mission/MissionDailyPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Mission/MissionDailyPanel.prefab index 317f1d4978..145ba9a602 100644 --- a/Assets/ManagedResources/Prefabs/UI/Mission/MissionDailyPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Mission/MissionDailyPanel.prefab @@ -3257,6 +3257,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1918779212887374031} + - {fileID: 7477322209160810193} m_Father: {fileID: 1918779212270220639} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -4464,7 +4465,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -18.55} + m_AnchoredPosition: {x: 0, y: 16} m_SizeDelta: {x: 459.73, y: 37.1} m_Pivot: {x: 0, y: 0.5} --- !u!222 &1918779212887373872 @@ -9220,6 +9221,100 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &6860646687044628261 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 7477322209160810193} + - component: {fileID: 3756077877038525707} + - component: {fileID: 8707570722145572194} + - component: {fileID: 5811088695344504971} + m_Layer: 5 + m_Name: time + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &7477322209160810193 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6860646687044628261} + 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: 3291570141714537517} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 26, y: -19} + m_SizeDelta: {x: 459.73, y: 37.1} + m_Pivot: {x: 0, y: 0.5} +--- !u!222 &3756077877038525707 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6860646687044628261} + m_CullTransparentMesh: 0 +--- !u!114 &8707570722145572194 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6860646687044628261} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 72f543c75b355a741976183c1e74debc, type: 3} + m_Name: + m_EditorClassIdentifier: + _textSpacing: -1 +--- !u!114 &5811088695344504971 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6860646687044628261} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.3018868, g: 0.3018868, b: 0.3018868, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_FontData: + m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_FontSize: 27 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 2 + m_MaxSize: 40 + m_Alignment: 3 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 1 + m_Text: "\u6D3B\u52A8\u65F6\u95F4\uFF1A" + LanguageIndex: 11708 --- !u!1 &6906709250642857206 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua b/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua index 99c41ee0ab..f4247b4c9d 100644 --- a/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua +++ b/Assets/ManagedResources/~Lua/Framework/Manager/ServerConfigManager.lua @@ -63,4 +63,12 @@ function ServerConfigManager.GetConfigInfo(key) local s = ConfigMgr:GetConfigInfo(key) return s end +end + + +function ServerConfigManager.GetSDKVersionCode() + if AppConst.isSDK then + return AndroidDeviceInfo.Instance:GetVersionCode() + end + return 9999 end \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Logic/Network.lua b/Assets/ManagedResources/~Lua/Logic/Network.lua index 781cbebeb7..c7f2411523 100644 --- a/Assets/ManagedResources/~Lua/Logic/Network.lua +++ b/Assets/ManagedResources/~Lua/Logic/Network.lua @@ -103,7 +103,7 @@ function Network:OnReconnect() if not self.isConnected then Log("没有收到 重连信息,重新设置链接!!") - self.socket:Disconnect() + self.socket:Disconnect("no reconnect msg, reset socket!!") end end) end diff --git a/Assets/ManagedResources/~Lua/Modules/DataCenterService/ThinkingAnalyticsManager.lua b/Assets/ManagedResources/~Lua/Modules/DataCenterService/ThinkingAnalyticsManager.lua index c6a78d8d63..a80ad82a9c 100644 --- a/Assets/ManagedResources/~Lua/Modules/DataCenterService/ThinkingAnalyticsManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/DataCenterService/ThinkingAnalyticsManager.lua @@ -71,7 +71,9 @@ end -- 获取设备Id function this.GetDeviceId() if AppConst.isSDK then - if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.ThinkAnalysis_GetDeviceID) then + if ServerConfigManager.IsSettingActive(ServerConfigManager.SettingConfig.ThinkAnalysis_GetDeviceID) + or ServerConfigManager.GetSDKVersionCode() >= 24 + then return App.TAMgr:GetDeviceId() end return AndroidDeviceInfo.Instance:GetDeviceID() diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationEditPopup.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationEditPopup.lua index d22ad0432b..ae33d8105e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationEditPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationEditPopup.lua @@ -143,7 +143,6 @@ function FormationEditPopup:BindEvent() break end end - LogRed(#choosedList) this.RefreshDesc() end) @@ -262,7 +261,7 @@ function this.SingleHeroDataShow(_go, _heroData) choosedList[i].position=v.position-1 end end - this.OnClickTabBtn(proId) + this.RefreshDesc() return end end @@ -277,8 +276,8 @@ function this.SingleHeroDataShow(_go, _heroData) choosed:SetActive(true) order=order+1 table.insert(choosedList, {did = heroData.dynamicId, choosed = choosed, position=order}) - this.OnClickTabBtn(proId) choosedList[heroData.dynamicId] = choosed + this.RefreshDesc() end) Util.AddLongPressClick(go, function() diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 3fcd3e6d03..54ef543521 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -1044,7 +1044,8 @@ function this.SetOneKeyGoExpedition() end for k, v in ipairs(theros) do local curSingleherodata = HeroManager.GetSingleHeroData(v.dynamicId) - if not upHeroSidTable[curSingleherodata.id] then + local hp = FormationManager.GetFormationHeroHp(this.curFormationIndex,v.dynamicId) + if not upHeroSidTable[curSingleherodata.id] and hp > 0 then LogGreen("this.choosedList "..#this.choosedList) if #this.choosedList < 6 then for n = 1, #posArr do diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayRewardSortPopup.lua b/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayRewardSortPopup.lua index 91d3fa370b..d3824b3dcc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayRewardSortPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/CarDelay/GuildCarDelayRewardSortPopup.lua @@ -116,6 +116,7 @@ function this.SetRankDataShow(msg) end myDemonsItemList[i].gameObject:SetActive(true) end + this.myDemons:SetActive(msg.myRankInfo.rank > 0) end --显示奖励 function this.ShowCurIndexRewardData() diff --git a/Assets/ManagedResources/~Lua/Modules/Guild/DeathPos/DeathPosManager.lua b/Assets/ManagedResources/~Lua/Modules/Guild/DeathPos/DeathPosManager.lua index 388bd33d88..0a3c9364b0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guild/DeathPos/DeathPosManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guild/DeathPos/DeathPosManager.lua @@ -27,7 +27,7 @@ function this.InitData(func) return end NetManager.GetDeathPathStatusResponse(function(msg) - this.allowchallange=msg.allowchallange + this.allowchallange=msg.allowChallange this.status=msg.status if this.status==DeathPosStatus.Fight then --请求剩余挑战次数 NetManager.GetDeathPathInfoResponse(function(msg1) diff --git a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroAndEquipListPanel.lua b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroAndEquipListPanel.lua index 597c81727f..508431bd67 100644 --- a/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroAndEquipListPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/HandBook/HandBookHeroAndEquipListPanel.lua @@ -641,7 +641,7 @@ function HandBookHeroAndEquipListPanel:OnShowSingleHeroData(...) if star == 6 then lv = 145 elseif star == 10 then - lv = 155 + lv = 255 elseif star == 11 then lv = 330 else diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua index bad3ee79c8..cb12cb75a8 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/Panel/HongMengEnvoyPanel.lua @@ -1,14 +1,11 @@ require("Base/BasePanel") HongMengEnvoyPanel = Inherit(BasePanel) - HongMengEnvoyPanel.contents = { [1] = {view = require("Modules/Harmony/View/HarmonyScrllow"), panelName = " HongMengEnvoyPanel"} } HongMengEnvoyPanel.prefab = {} - HongMengEnvoyPanel.EnvoyItemList = {} local Item = require("Modules/Harmony/EnvoyItem/EnvoyItem") - local Gold = 0 local GrowthAmulet = 0 HongMengEnvoyPanel.timerEffect = nil @@ -43,27 +40,17 @@ function HongMengEnvoyPanel:InitComponent() HarmonyManager:SetTowerInit() self:InitEnvoyItemList(ItemPfb, parent) - - end function HongMengEnvoyPanel:InitEnvoyItemList(ItemPfb, parent) for i = 1, #HarmonyManager.hongmengGuards do - -- bodys - self.EnvoyItemList[i] = Item:New(newObject(ItemPfb)) - self.EnvoyItemList[i]:InitComponent(parent, HarmonyManager.hongmengGuards[i]) end for i = 1, #self.contents do self.prefab[i] = Util.GetGameObject(self.panel, self.contents[i].panelName) - self.contents[i].view:InitComponent( - self.panel, - BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi), - BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal), - 2 - ) + self.contents[i].view:InitComponent(self.panel,BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi),BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal),2) end end --绑定事件(用于子类重写) @@ -94,7 +81,6 @@ function HongMengEnvoyPanel:BindEvent() PopupTipPanel.ShowTip("鸿蒙碑等级已达上限!") else local data = HarmonyManager:GetHongMengUpData() - --print(data.LevelUp[1][2].." "..data.LevelUp[2][2]) if data == nil then return end @@ -137,7 +123,6 @@ function HongMengEnvoyPanel:RunTimerFun() for key, value in pairs(self.EnvoyItemList) do if HarmonyManager.hongmengGuards[key].time - GetTimeStamp() > 0 then if value.Empty.activeSelf == false then - -- body value.Empty:SetActive(true) end local time_content = TimeToFelaxible(HarmonyManager.hongmengGuards[key].time - GetTimeStamp()) @@ -163,7 +148,6 @@ function HongMengEnvoyPanel:IsUpBtnGray() self.imageGame:SetActive(false) self.TextGame:SetActive(false) self.UnShowText:SetActive(true) - -- self.UpBtnRedPoint:SetActive(false) else Util.SetGray(self.UpBtn, false) self.imageGame:SetActive(true) @@ -174,11 +158,8 @@ function HongMengEnvoyPanel:IsUpBtnGray() CheckRedPointStatus(RedPointType.HongMeng_UpTower) end function HongMengEnvoyPanel:RefeshRedPoint() - -- body - end function HongMengEnvoyPanel:UpdateShow(list) - for i = 1, #list do --LogBlue("执行刷新"..list[i].heroId) self.EnvoyItemList[i]:SetItemData(list[i]) @@ -259,7 +240,6 @@ end --界面打开时调用(用于子类重写) function HongMengEnvoyPanel:OnOpen(equipSId) --NetManager.PlayerInfoRequest(LoadingPanel.OnStep) - for i = 1, #self.EnvoyItemList do self.EnvoyItemList[i]:OnOpen() end diff --git a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua index aecf71ce6e..70c7588d30 100644 --- a/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua +++ b/Assets/ManagedResources/~Lua/Modules/Harmony/View/HarmonyScrllow.lua @@ -1,16 +1,10 @@ local this={} - this.tab=ConfigManager.GetConfig(ConfigName.Hongmeng) - - - local Gold =0; local DemonCrystal = 0 local HeroList = {} - local tempData = nil local TempItem = nil - local ItemList = {} local Box = 0 local OpenBox = 0 @@ -21,146 +15,85 @@ function this:AwakeLength() HeroCount = 0 Box = #HarmonyManager.hongmengHeroInfos; OpenBox = #HarmonyManager.hongmengHeroInfos+2 - --print(Box.."@@@@@@@@@"..OpenBox) for i = 1, #HarmonyManager.hongmengHeroInfos do - -- body if HarmonyManager.hongmengHeroInfos[i].heroId~="" then - -- body HeroCount = HeroCount + 1 end end - if self.stage == 1 then - -- body this.NumText.text = string.format("%d/%d",HeroCount,Box) - else - local count = 0 for i = 1, #HarmonyManager.hongmengGuards do - -- body if HarmonyManager.hongmengGuards[i].heroId ~= "" then count = count + 1 - -- body end end - this.NumText.text = string.format("%d/%d",HeroCount + count,Box + #HarmonyManager.hongmengGuards) end - end function this:InitComponent(gameObject,Golds,DemonCrystals,stage) Gold = Golds DemonCrystal = DemonCrystals self.stage = stage - -- item预制件 - this.item = Util.GetGameObject(gameObject , "HarmonyPanel/item") - --btn组件 this.addBtn = Util.GetGameObject(gameObject,"HarmonyPanel/AddBtn") this.GongMingMsgBtn = Util.GetGameObject(gameObject,"HarmonyPanel/KnowGongMing") - this.scrollbar = Util.GetGameObject(gameObject,"HarmonyPanel/Scrollbar"):GetComponent("Scrollbar") local scrollParent = Util.GetGameObject(gameObject, "HarmonyPanel/scroll"):GetComponent("RectTransform").rect - this.NumText = Util.GetGameObject(gameObject,"HarmonyPanel/itemNumText"):GetComponent("Text") - this.ScrollView=SubUIManager.Open(SubUIConfig.ScrollCycleView,Util.GetGameObject(gameObject,"HarmonyPanel/scroll").transform, this.item,this.scrollbar,Vector2.New(-scrollParent.x*2,-scrollParent.y*2),1,5,Vector2.New(42,15)) this.ScrollView.moveTween.MomentumAmount = 1 this.ScrollView.moveTween.Strength = 1 - -- for key, value in ConfigPairs(this.tab) do - -- print("key:",key,"value",value.Id) - -- end - - this.BoxList=0; this:AwakeLength() this:InitBox() - --this.RunTimerFun() end local TextList = {} local BoxList = {} function this:InitBox() - - -- - local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度 - this.ScrollView:SetData(keys,function (index, go) local key = keys[index] - this.SingleBoxDataShow(go, this.tab[key], index) - - end,false,false) - --print(LengthOfTable(ItemList)) - - - end function this.RunTimerFun() - local refreshFunc = function() - for key, value in pairs(ItemList) do if value.index <= #HarmonyManager.hongmengHeroInfos then - --value.TimerText.text = "" value.index <= #HarmonyManager.hongmengHeroInfos and - -- print("倒计时开启 .."..#HarmonyManager.hongmengHeroInfos) if value.TimerText ~=nil and value.Empty ~=nil then - -- body if HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp() > 0 then if value.Empty ~=nil then - -- body - --print(value.Empty," ") - -- if value.Empty.activeSelf == false then - -- -- body - -- value.Empty:SetActive(true) - -- end end - local time_content = TimeToFelaxible(HarmonyManager.hongmengHeroInfos[value.index].time - GetTimeStamp()) - --print(" ~~~~~ ",value.TimerText," xxxxx",time_content) value.TimerText.text = string.format("%s\n后恢复",time_content) else - HarmonyManager.hongmengHeroInfos[value.index].time = 0 - if value.TimerText then - -- body value.TimerText.text = "" if not value.AddImage.activeSelf then - -- body value.AddImage:SetActive(true) end - end - end end - - else - end end - end if this.timerEffect ==nil then - -- body this.timerEffect = Timer.New(refreshFunc, 1, -1, true) end - this.timerEffect:Start() refreshFunc() end function this.SingleBoxDataShow(go,boxData,index) - -- body - local mask = Util.GetGameObject(go.transform,"Box/Empty/lock/mask"); local lock = Util.GetGameObject(go.transform,"Box/Empty/lock"); local Empty = Util.GetGameObject(go.transform,"Box/Empty") @@ -169,7 +102,6 @@ function this.SingleBoxDataShow(go,boxData,index) local redPoint = Util.GetGameObject(go.transform,"Box/Empty/redPoint") Util.GetGameObject(go.transform, "GameObject/proIcon"):GetComponent("Image").sprite = Util.LoadSprite("r_hero_huo 1_zh") - ItemList[go] ={} ItemList[go].index = index ItemList[go].TimerText = TimerText @@ -194,10 +126,7 @@ function this.SingleBoxDataShow(go,boxData,index) LogError("error: no hero data") end else - if gridData.time - GetTimeStamp() <= 0 then - -- body - TimerText.text = "" AddImage:SetActive(true) else @@ -209,19 +138,15 @@ function this.SingleBoxDataShow(go,boxData,index) redPoint:SetActive(false) end else - end elseif index == Box + 1 then mask:SetActive(false) Util.SetGray(lock,false) tempData = boxData if HarmonyManager.RefreshOpenBoxPoint() then - -- body Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi) CheckRedPointStatus(RedPointType.HongMeng_OpenBox) - -- print(Gold.."!@@@@@@"..boxData.PropPrice[2]) if Gold > boxData.PropPrice[2] then - -- body redPoint:SetActive(true) else redPoint:SetActive(false) @@ -231,29 +156,22 @@ function this.SingleBoxDataShow(go,boxData,index) end else TimerText.text = "" - end - Util.AddOnceClick(go,function() if gridData then - -- body if gridData.heroId ~= "" then - -- body TempItem = index HarmonyManager:SetMingListIndexData(boxData.Id) HarmonyManager.UnLoadGongMing = boxData.Id--发往服务器 UIManager.OpenPanel(UIName.HongMengUnLoadPanel) else if gridData.time == 0 then - -- body UIManager.OpenPanel(UIName.HongMengChooseHeroPanel,false) TempItem = index - HarmonyManager.GongMingBox = boxData.Id print(" 添加等级 ",HarmonyManager.GongMingBox) else local content = "" - --print((HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) / 432) local money = math.ceil((HarmonyManager.hongmengHeroInfos[boxData.Id].time - GetTimeStamp()) / 432) content =string.format("是否花费%d妖晶直接恢复",money) @@ -267,10 +185,7 @@ function this.SingleBoxDataShow(go,boxData,index) end --向服务器 发消息 NetManager.UnlockGrid(boxData.Id,1,function () - -- body - for i = 1, #HarmonyManager.hongmengHeroInfos do - -- body if HarmonyManager.hongmengHeroInfos[i].gridId ==boxData.Id then HarmonyManager.hongmengHeroInfos[i].time = 0 print("清除数据") @@ -282,7 +197,6 @@ function this.SingleBoxDataShow(go,boxData,index) end,"取消","确认") this.RunTimerFun() - end) end end @@ -292,23 +206,14 @@ function this.SingleBoxDataShow(go,boxData,index) PopupTipPanel.ShowTip("请先解锁前一个共鸣位置!") else if lock.activeSelf then - -- body this:AddBoxFun(boxData) end end end end) - - - - -end ---卸载刷新 -function this:UpdateItemShow(go,boxData,msg) - - - + function this:UpdateItemShow(go,boxData,msg) + end end function this:AddBoxFun(boxData) local content = "" @@ -329,54 +234,40 @@ function this:AddBoxFun(boxData) end MsgPanel.ShowTwo(content,function () - end,function () if Gold < boxData.PropPrice[2] and DemonCrystal < boxData.MoneyPrice[2] then PopupTipPanel.ShowTip("妖晶不足!") return - end - if condition then - -- body end --向服务器请求消息 NetManager.HongMengRequset(boxData.Id,function() - -- Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.RereshNumText,boxData.Id) end) end,"取消","确认") end + function this:BindEvent() - end function this:OnOpen() - this:AwakeLength() ItemList = {} this:InitBox() this.RunTimerFun() - --this.timerEffect:Start() end function this.SingleItemDataShow(clone,Itemdata) - --LogGreen(clone.name.."||"..Itemdata.heroConfig.Id) - --Util.GetGameObject(clone.transform, "Box/Empty"):SetActive(false) Util.GetGameObject(clone.transform, "GameObject/frame"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroQuantityImageByquality(Itemdata.heroConfig.Quality,Itemdata.star)) Util.GetGameObject(clone.transform, "GameObject/lv/Text"):GetComponent("Text").text = string.format("%d",Itemdata.lv) Util.GetGameObject(clone.transform, "GameObject/icon"):GetComponent("Image").sprite = Util.LoadSprite(Itemdata.icon) - --Util.GetGameObject(clone.transform, "GameObject/posIcon"):SetActive(false)--:GetComponent("Image").sprite = Util.LoadSprite(heroData.professionIcon) Util.GetGameObject(clone.transform, "GameObject/proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(Itemdata.heroConfig.PropertyName)) local starGrid = Util.GetGameObject(clone.transform, "GameObject/star") SetHeroStars(starGrid, Itemdata.star,1,nil,nil,Vector2.New(0,1)) - end function this:Refesh(id) - -- body - Box = Box + 1 OpenBox = OpenBox + 1 - Gold = BagManager.GetTotalItemNum(UpViewRechargeType.XuanHuangZhiQi) DemonCrystal = BagManager.GetTotalItemNum(UpViewRechargeType.DemonCrystal) if self.stage == 1 then @@ -384,15 +275,12 @@ function this:Refesh(id) else local count = 0 for i = 1, #HarmonyManager.hongmengGuards do - -- body if HarmonyManager.hongmengGuards[i].heroId ~= "" then count = count + 1 - -- body end end Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount + count,Box + #HarmonyManager.hongmengGuards}) end - LogGreen(Box) local data = {} data.gridId = id data.heroId = "" @@ -401,66 +289,45 @@ function this:Refesh(id) local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度 this.ScrollView:SetData(keys,function (index, go) local key = keys[index] - this.SingleBoxDataShow(go, this.tab[key], index) - - end,true,true) end function this:OpenBoxFun() if tempData then - -- body this:AddBoxFun(tempData) else PopupTipPanel.ShowTip("共鸣格子已经全部解锁") return end - end function this:UpdateHero(Herodata) - - for i = 1, #HarmonyManager.hongmengHeroInfos do - -- body if HarmonyManager.GongMingBox ==HarmonyManager.hongmengHeroInfos[i].gridId then - -- body - HarmonyManager.hongmengHeroInfos[i].heroId = Herodata.dynamicId HarmonyManager.hongmengHeroInfos[i].time = 0 - break end end HeroCount = HeroCount + 1 if self.stage == 1 then - -- body Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box}) else local count = 0 for i = 1, #HarmonyManager.hongmengGuards do - -- body if HarmonyManager.hongmengGuards[i].heroId~="" then count = count + 1 - -- body end end Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount + count,Box + #HarmonyManager.hongmengGuards}) end - --Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1}) - --this.NumText.text = string.format("%d/%d",HeroCount,Box) local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度 - --刷新选择英雄界面的 数据 HarmonyManager:SetInitList() - this.ScrollView:SetData(keys,function (index, go) local key = keys[index] - this.SingleBoxDataShow(go, this.tab[key], index) - - end,true,true) this.RunTimerFun() end @@ -469,44 +336,30 @@ end function this:UnLoadFun(msg) HeroCount = HeroCount - 1 - for key, value in pairs(ItemList) do if value.index == TempItem then - -- body HarmonyManager.hongmengHeroInfos[value.index].time = msg.leftTime + GetTimeStamp() - HarmonyManager.hongmengHeroInfos[value.index].heroId = "" - end - - end + end --刷新选择英雄界面的 数据 HarmonyManager:SetInitList() if self.stage == 1 then - -- body Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1}) else local count = 0 for i = 1, #HarmonyManager.hongmengGuards do - -- body if HarmonyManager.hongmengGuards[i].heroId ~= "" then count = count + 1 - -- body end end Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount + count,Box + #HarmonyManager.hongmengGuards}) end - -- Game.GlobalEvent:DispatchEvent(GameEvent.HongMeng.OnlyRefeshText,{HeroCount,Box, 1}) - --this.NumText.text = string.format("%d/%d",HeroCount,Box) local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度 - ItemList = {} this.ScrollView:SetData(keys,function (index, go) local key = keys[index] - this.SingleBoxDataShow(go, this.tab[key], index) - - end,true,true) this.RunTimerFun() end @@ -516,25 +369,18 @@ function this:OnlyRefeshHeroLv() local keys = GameDataBase.SheetBase.GetKeys(this.tab) --获取数据长度 this.ScrollView:SetData(keys,function (index, go) local key = keys[index] - this.SingleBoxDataShow(go, this.tab[key], index) - - end,true,true) - end --界面关闭时调用(用于子类重写) function this:OnClose() if this.timerEffect then - -- body this.timerEffect:Stop() end end function this:AddListener() - -- body - Game.GlobalEvent:AddEvent(GameEvent.HongMeng.RereshNumText,self.Refesh,self) Game.GlobalEvent:AddEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self) Game.GlobalEvent:AddEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self) @@ -544,7 +390,6 @@ function this:AddListener() end function this:RemoveListener() - -- body Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.RereshNumText,self.Refesh,self) Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.OpenBoxTips,self.OpenBoxFun,self) Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.ChooseData,self.UpdateHero,self) @@ -553,11 +398,5 @@ function this:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.HongMeng.UpdateGongMingLv,self.OnlyRefeshHeroLv,self) end function this:OnShow(...) - -- body - end - - - - return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua index 12c4b4d6d5..f14b8d4f68 100644 --- a/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua +++ b/Assets/ManagedResources/~Lua/Modules/Mission/MissionDailyPanel_QingLongSecretTreasure.lua @@ -16,7 +16,8 @@ function this:InitComponent(gameObject) this.quesBtn = Util.GetGameObject(this.gameObject, "bg/quesBtn") this.helpPosition= this.quesBtn:GetComponent("RectTransform").localPosition this.tips = Util.GetGameObject(this.gameObject, "bg/topBar/tips"):GetComponent("Text") - this.time = Util.GetGameObject(this.gameObject, "bg/topBar/time/Text"):GetComponent("Text") + this.timeTxt = Util.GetGameObject(this.gameObject, "bg/topBar/time/Text"):GetComponent("Text") + this.time = Util.GetGameObject(this.gameObject, "bg/topBar/time/time"):GetComponent("Text") this.buyBtn = Util.GetGameObject(this.gameObject, "bg/topBar/button/buyBtn") this.buyBtnText = Util.GetGameObject(this.buyBtn, "Text"):GetComponent("Text") diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua index 9c891c6a3d..4acb1241e3 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua @@ -474,12 +474,12 @@ function this.ShowLvAndExp() if #itemDataList <= 25 then this.exp.value=PlayerManager.exp/userLevelData[PlayerManager.level].Exp this.expText.text=PlayerManager.exp.."/"..userLevelData[PlayerManager.level].Exp - this.lv.text="LV."..PlayerManager.level + this.lv.text= PlayerManager.level this.lvUpImage:SetActive(FightPointPassManager.oldLevel 25 then this.expMax.value=PlayerManager.exp/userLevelData[PlayerManager.level].Exp this.expTextMax.text=PlayerManager.exp.."/"..userLevelData[PlayerManager.level].Exp - this.lvMax.text="LV."..PlayerManager.level + this.lvMax.text= PlayerManager.level this.lvUpImageMax:SetActive(FightPointPassManager.oldLevel= 25 + then if not LayoutRebuilder then LayoutRebuilder = UnityEngine.UI.LayoutRebuilder end