From ebde6e43b0a2e2a1e99446d85bd968080f9c43cb Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Mon, 26 Apr 2021 15:45:30 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=3D=3D=3D=3D=3D=3D=3D=3D?= =?UTF-8?q?=E3=80=90ID1008784=E3=80=91=20=E3=80=90=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E5=A2=9E=E5=8A=A0=E6=88=90=E9=95=BF?= =?UTF-8?q?=E7=A4=BC=E5=8C=85=E5=85=A5=E5=8F=A3=E8=B7=B3=E8=BD=AC=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Main/MainPanel.prefab | 118 ++++++++++++++++++ .../ManagedResources/~Lua/Logic/GameEvent.lua | 2 + .../~Lua/Modules/Main/MainPanel.lua | 29 ++++- .../~Lua/Modules/Popup/SupremeHeroPopup.lua | 5 + .../~Lua/Modules/Recharge/View/GiftPre.lua | 3 + 5 files changed, 155 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab index 1cc7e091ac..ae276f6445 100644 --- a/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Main/MainPanel.prefab @@ -44806,6 +44806,7 @@ RectTransform: m_Children: - {fileID: 9158673223480268760} - {fileID: 3958316192645827337} + - {fileID: 6379532960330795117} m_Father: {fileID: 986452627335843391} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -70723,6 +70724,123 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &6901911044717125155 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6379532960330795117} + - component: {fileID: 5090937801259970180} + - component: {fileID: 908337413429037902} + - component: {fileID: 7804761533185754883} + m_Layer: 5 + m_Name: sixStarHero + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6379532960330795117 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6901911044717125155} + 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: 1470640894515440942} + m_RootOrder: 2 + 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: -75.10001, y: -304.1} + m_SizeDelta: {x: 132, y: 122} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5090937801259970180 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6901911044717125155} + m_CullTransparentMesh: 0 +--- !u!114 &908337413429037902 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6901911044717125155} + 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: 1144aac02180acd459ccb1acdd344c02, 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 +--- !u!114 &7804761533185754883 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6901911044717125155} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 908337413429037902} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null --- !u!1 &7020458089550377753 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua index 9a0bb05d6b..fbb7397da5 100644 --- a/Assets/ManagedResources/~Lua/Logic/GameEvent.lua +++ b/Assets/ManagedResources/~Lua/Logic/GameEvent.lua @@ -43,6 +43,8 @@ GameEvent = { OnHeadChange = "Player.OnHeadChange", --打关卡升级小提示 OnShowBattleUpLvTip = "Player.OnShowBattleUpLvTip", + --玩家获取玉皇大帝奖励 + OnPlayerGetSuperManReward ="Player.OnPlayerGetSuperManReward", }, Treasure={ --宝物强化/精炼提升 diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 45c105791b..db4cfe37e6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -114,6 +114,9 @@ function this:InitComponent() --鸿蒙 this.btnHongMeng=Util.GetGameObject(self.gameObject,"RightDown/btnHongMeng") this.HongMengRedPoint = Util.GetGameObject(this.btnHongMeng,"redPoint") + + --六星前往 + this.btnSixStarGo=Util.GetGameObject(self.gameObject,"LeftUp/sixStarHero") -------------------场景中的按钮------------------------ -- 按钮 @@ -324,6 +327,12 @@ function this:BindEvent() Util.AddClick(this.fgBtn,function() UIManager.OpenPanel(UIName.FifteenDayGiftPanel) end) + + --六星前往 + Util.AddClick(this.btnSixStarGo,function() + JumpManager.GoJump(36011) + end) + --日常任务 Util.AddClick(this.btnDailyMission, function() UIManager.OpenPanel(UIName.MissionDailyPanel) @@ -599,6 +608,7 @@ function this:AddListener() Game.GlobalEvent:AddEvent(GameEvent.EightDay.FifteenDayGift, this.RefreshEightGiftPreview) Game.GlobalEvent:AddEvent(GameEvent.FindFairy.RefreshBuyOpenState, this.RefreshGiftBtnShow) Game.GlobalEvent:AddEvent(GameEvent.Player.OnShowBattleUpLvTip, this.RefreshBattleUpLvTip) + Game.GlobalEvent:AddEvent(GameEvent.Player.OnPlayerGetSuperManReward, this.GetSuperManReward) end --移除事件监听(用于子类重写) @@ -613,7 +623,11 @@ function this:RemoveListener() Game.GlobalEvent:RemoveEvent(GameEvent.FiveAMRefresh.ServerNotifyRefresh, this.RefreshEightGiftPreview) Game.GlobalEvent:RemoveEvent(GameEvent.EightDay.FifteenDayGift, this.RefreshEightGiftPreview) Game.GlobalEvent:RemoveEvent(GameEvent.FindFairy.RefreshBuyOpenState, this.RefreshGiftBtnShow) - Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnShowBattleUpLvTip, this.RefreshBattleUpLvTip) + Game.GlobalEvent:RemoveEvent(GameEvent.Player.OnPlayerGetSuperManReward, this.GetSuperManReward) +end + +function this.GetSuperManReward() + this.CheckSixStarGoShow() end function this:OnSortingOrderChange() @@ -641,6 +655,16 @@ function this:OnOpen() this.CreatActivity() end +--检测六星前往活动是否显示 +function this.CheckSixStarGoShow() + local time=PlayerPrefs.GetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."supermeMan",0) + if time and time~=0 and time~=666 and GetTimeStamp()-time< 259200 then + this.btnSixStarGo:SetActive(true) + else + this.btnSixStarGo:SetActive(false) + end +end + function this.CreatActivity() for k,v in ipairs(activitys) do if not activityTabs[k] then @@ -773,7 +797,8 @@ function this:OnShow() SoundManager.PlayMusic(SoundConfig.BGM_Main) --刷新主城npc this:OnChangeTitleOrRideOrSkin() - + --检测主城六星入口是否显示 + this.CheckSixStarGoShow() Log(string.format("---------------------%s", BagManager.GetItemCountById(14))) this.UpView:OnOpen({ showType = UpViewOpenType.ShowRight, panelType = PanelType.Main }) this.BtView:OnOpen({ sortOrder = self.sortingOrder, panelType = PanelTypeView.MainCity }) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua index 7ad516ea3f..a1f6e60627 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua @@ -125,6 +125,11 @@ function SupremeHeroPopup:BindEvent() Util.SetGray(this.doneBtn, true) this.doneBtn:GetComponent("Button").enabled = false this.btnText.text = Language[10101] + local time=PlayerPrefs.GetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."supermeMan",0) + if time~=666 then + PlayerPrefs.SetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."supermeMan",GetTimeStamp()) + Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnPlayerGetSuperManReward) + end CheckRedPointStatus(RedPointType.SupremeHero) end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftPre.lua b/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftPre.lua index 6cb3971ed2..e2fb786a9d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftPre.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recharge/View/GiftPre.lua @@ -131,6 +131,9 @@ function GiftPre:BuyAction(costId, costNum, shopType, itemId) self.parent:RefreshData(nil,false,false) CheckRedPointStatus(RedPointType.DailyGift) CheckRedPointStatus(RedPointType.GrowthPackage) + if shopType==20 and itemId==1107 then + PlayerPrefs.SetString(PlayerManager.uid..PlayerManager.serverInfo.server_id.."supermeMan",666) + end end) end local isPopUp = RedPointManager.PlayerPrefsGetStr(PlayerManager.uid .. shopType)