diff --git a/Assets/ManagedResources/Effects/Materials/GuidePanelMat.mat b/Assets/ManagedResources/Effects/Materials/GuidePanelMat.mat index b7d1a36e69..f94857ae6e 100644 --- a/Assets/ManagedResources/Effects/Materials/GuidePanelMat.mat +++ b/Assets/ManagedResources/Effects/Materials/GuidePanelMat.mat @@ -76,8 +76,8 @@ Material: - _SrcBlend: 1 - _Trans: 10 - _UVSec: 0 - - _X: 0.5 - - _Y: 0.5 + - _X: 0.82842594 + - _Y: 0.124479175 - _ZWrite: 1 m_Colors: - _Color: {r: 1, g: 1, b: 1, a: 1} diff --git a/Assets/ManagedResources/Prefabs/UI/XiaoYao/StoryMapPanel.prefab b/Assets/ManagedResources/Prefabs/UI/XiaoYao/StoryMapPanel.prefab index 06df0302da..51abde9db8 100644 --- a/Assets/ManagedResources/Prefabs/UI/XiaoYao/StoryMapPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/XiaoYao/StoryMapPanel.prefab @@ -80,6 +80,114 @@ MonoBehaviour: m_LineSpacing: 1 m_Text: "\u6740\u795E\u65E0\u654C" LanguageIndex: 0 +--- !u!1 &1188181154469230993 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 6916387089339203805} + - component: {fileID: 4579583553185512363} + - component: {fileID: 6496223802836886800} + - component: {fileID: 418156885827534537} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &6916387089339203805 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1188181154469230993} + 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: 4358468656714457005} + 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: -27.1, y: 634.9} + m_SizeDelta: {x: 829.8, y: 456.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &4579583553185512363 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1188181154469230993} + m_CullTransparentMesh: 0 +--- !u!114 &6496223802836886800 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1188181154469230993} + 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: 418156885827534537} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &418156885827534537 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1188181154469230993} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e459a084d8e15a240b58db751097122b, 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 --- !u!1 &1424166420779353743 GameObject: m_ObjectHideFlags: 0 @@ -921,7 +1029,7 @@ RectTransform: m_Children: - {fileID: 7745173554475447848} - {fileID: 689194135141293348} - - {fileID: 8770770672214491637} + - {fileID: 4358468656714457005} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -1444,6 +1552,81 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &8114904895057370193 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4358468656714457005} + - component: {fileID: 3447940163310522737} + - component: {fileID: 6912752879918725817} + m_Layer: 5 + m_Name: mask + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4358468656714457005 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8114904895057370193} + 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: 6916387089339203805} + m_Father: {fileID: 1553045991312230259} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3447940163310522737 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8114904895057370193} + m_CullTransparentMesh: 0 +--- !u!114 &6912752879918725817 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 8114904895057370193} + 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: 0} + 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: 0} + 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!1 &8668927271449141912 GameObject: m_ObjectHideFlags: 0 @@ -1658,140 +1841,3 @@ MonoBehaviour: m_LineSpacing: 1 m_Text: "\u8DF3\u8FC7" LanguageIndex: 0 ---- !u!1 &8973482268264923976 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 8770770672214491637} - - component: {fileID: 7065227622849641265} - - component: {fileID: 7548016286644530740} - - component: {fileID: 9210975288211983724} - - component: {fileID: 3722184819210881596} - m_Layer: 5 - m_Name: btnBack - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &8770770672214491637 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8973482268264923976} - 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: 1553045991312230259} - m_RootOrder: 2 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 68.80005, y: 94.799805} - m_SizeDelta: {x: 140, y: 121} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7065227622849641265 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8973482268264923976} - m_CullTransparentMesh: 0 ---- !u!114 &7548016286644530740 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8973482268264923976} - 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: 2887ec8dbdcb57242a540f77f7cb5a72, 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!95 &9210975288211983724 -Animator: - serializedVersion: 3 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8973482268264923976} - m_Enabled: 1 - m_Avatar: {fileID: 0} - m_Controller: {fileID: 9100000, guid: 6ffe000b5a58aac48a9d130543849d76, type: 2} - m_CullingMode: 0 - m_UpdateMode: 0 - m_ApplyRootMotion: 0 - m_LinearVelocityBlending: 0 - m_WarningMessage: - m_HasTransformHierarchy: 1 - m_AllowConstantClipSamplingOptimization: 1 - m_KeepAnimatorControllerStateOnDisable: 0 ---- !u!114 &3722184819210881596 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8973482268264923976} - 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: 3 - 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: 7548016286644530740} - m_OnClick: - m_PersistentCalls: - m_Calls: [] - m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, - Culture=neutral, PublicKeyToken=null diff --git a/Assets/ManagedResources/~Lua/Modules/Arena/ArenaManager.lua b/Assets/ManagedResources/~Lua/Modules/Arena/ArenaManager.lua index 0565c1f77d..28ae4478cb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Arena/ArenaManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Arena/ArenaManager.lua @@ -353,7 +353,7 @@ function this.SetHadTakeBoxData(boxId) end function this.FreeBattleRedCheck() - return (this.GetArenaChallengeTimes() > 0) and ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.ARENA) + return (this.GetArenaChallengeTimes() > 0) and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ARENA) end function this.RewardBoxRedCheck() @@ -364,7 +364,7 @@ function this.RewardBoxRedCheck() for i = 1, 7 do if arenaBattleReward[i] then local state = 1--1 未完成 2 未领取 3 已完成allNums >= arenaBattleReward[i].BattleTimes and false - if allNums >= arenaBattleReward[i].BattleTimes and not allBoxGetState[i] and ActTimeCtrlManager.IsQualifiled(FUNCTION_OPEN_TYPE.ARENA) then + if allNums >= arenaBattleReward[i].BattleTimes and not allBoxGetState[i] and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.ARENA) then return true end end diff --git a/Assets/ManagedResources/~Lua/Modules/Arena/ArenaTypePanel.lua b/Assets/ManagedResources/~Lua/Modules/Arena/ArenaTypePanel.lua index b993f1fab4..375c1d4692 100644 --- a/Assets/ManagedResources/~Lua/Modules/Arena/ArenaTypePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Arena/ArenaTypePanel.lua @@ -74,8 +74,10 @@ end -- 打开,重新打开时回调 function ArenaTypePanel:OnShow() -- 竞技场 - NetManager.RequestArenaRankData(1, function() - this.RefreshArenaShow() + NetManager.RequestBaseArenaData(function() + NetManager.RequestArenaRankData(1, function() + this.RefreshArenaShow() + end) end) -- 巅峰战 ArenaTopMatchManager.RequestTopMatchBaseInfo(function() diff --git a/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargeManager.lua b/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargeManager.lua index b5031a44eb..2c0fe03210 100644 --- a/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargeManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargeManager.lua @@ -167,4 +167,14 @@ function this.IsShowFirstChatge() return false end end + +-- +function this.GetAnimFlag(key) + local lt = PlayerPrefs.GetInt(PlayerManager.uid..key) + return Util_Check_insameday(lt, GetTimeStamp()) +end +function this.SetAnimFlag(key) + PlayerPrefs.SetInt(PlayerManager.uid..key, GetTimeStamp()) +end + return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargePanel.lua b/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargePanel.lua index 34f6e11173..8a191165f8 100644 --- a/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/FirstRecharge/FirstRechargePanel.lua @@ -133,9 +133,13 @@ function FirstRechargePanel:OnOpen(context,_fun) self.selectTabIndex = context.tabIndex and context.tabIndex or 1 -- self:SetOncePart() fun = _fun - self.qianyao:SetActive(false) - self.qianyao:SetActive(true) + local qyTime = 0 + if not FirstRechargeManager.GetAnimFlag("FirstRechargeAnim") then + self.qianyao:SetActive(true) + qyTime = 1.5 + FirstRechargeManager.SetAnimFlag("FirstRechargeAnim") + end self.frame:SetActive(false) self.effect:SetActive(false) self.ani.enabled = false @@ -145,11 +149,11 @@ function FirstRechargePanel:OnOpen(context,_fun) self.frame:SetActive(true) self.effect:SetActive(true) self.ani.enabled = true - end, 1.5):Start() + end, qyTime):Start() Timer.New(function () self.tabs[1]:SetActive(true) self.closeBtn:GetComponent("Button").enabled = true - end, 2.5):Start() + end, qyTime + 1):Start() end function FirstRechargePanel:OnShow() diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua index 170ec5be67..732c3604ed 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuideManager.lua @@ -44,8 +44,10 @@ function this.OnLevelChange() -- 首充引导特殊处理到十级开放 if PlayerManager.level == 10 then table.insert(_FuncGuideList, 100200) - StoryMapManager.isShowStory = true + StoryMapManager.isShowStory = 1 this.CheckFuncGuide() + elseif PlayerManager.level == 22 then + StoryMapManager.isShowStory = 3 end end -- diff --git a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua index f96067a1e5..a590efa614 100644 --- a/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Guide/GuidePanel.lua @@ -474,11 +474,11 @@ function this.ExecuteBehavior(beType, beArgs) end function this.ShowStory(nextId,OnFocus) - if StoryMapManager.isShowStory then - StoryMapManager.isShowStory = false + if StoryMapManager.isShowStory ~= 0 then + StoryMapManager.isShowStory = 0 local isShowStory = 1 - if PlayerPrefs.HasKey("StoryMapPanel1"..PlayerManager.uid) then - isShowStory = PlayerPrefs.GetInt("StoryMapPanel1"..PlayerManager.uid) + if PlayerPrefs.HasKey("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid) then + isShowStory = PlayerPrefs.GetInt("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid) end if isShowStory == 1 then LogGreen("this.gameObject:"..this.gameObject.name) @@ -488,8 +488,8 @@ function this.ShowStory(nextId,OnFocus) Game.GlobalEvent:RemoveEvent(GameEvent.GuaJi.CloseStoryMapPanel,onCloseStoryMapPanel) end Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,onCloseStoryMapPanel) - PlayerPrefs.SetInt("StoryMapPanel1"..PlayerManager.uid,0) - StoryMapManager.InitData(1) + PlayerPrefs.SetInt("StoryMapPanel"..StoryMapManager.isShowStory..PlayerManager.uid,0) + StoryMapManager.InitData(StoryMapManager.isShowStory) else this.NextGuide(nextId) Game.GlobalEvent:RemoveEvent(GameEvent.UI.OnOpen, OnFocus) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index ed0b029163..a97b10d080 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -263,7 +263,7 @@ end --绑定事件(用于子类重写) function this:BindEvent() Util.AddOnceClick(this.btnEndLess,function() - StoryMapManager.InitData(3) + StoryMapManager.InitData(1) end) self.trigger = Util.GetEventTriggerListener(self.ctrl) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/Config/MapConfig.lua b/Assets/ManagedResources/~Lua/Modules/Map/Config/MapConfig.lua index 8a112a3911..75c8b5549a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/Config/MapConfig.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/Config/MapConfig.lua @@ -90,6 +90,9 @@ MapFloatingConfig = { [25] = {name = "live2d_r_MapEffect_NewEvent_002",--人 scale = Vector3.New(0.05, 0.05, 0.05), position = Vector3.New(0, 0, 0)}, + [26] = {name = "live2d_r_MapEffect_NewEvent_002",--人 + scale = Vector3.New(0.1, 0.1, 0.1), + position = Vector3.New(0, 0, 0)}, } -- 特效资源的相关数组 diff --git a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua index 2da18dbfc4..54802b373a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Player/RedpotManager.lua @@ -327,8 +327,8 @@ function this.RegisterRedCheckFunc() RPData:AddCheckFunc(RedPointType.Role, HeroManager.GetFormationHeroRedPoint) --竞技场部分红点 - RPData:AddCheckFunc(RedPointType.Arena_Free, ArenaManager.FreeBattleRedCheck) - RPData:AddCheckFunc(RedPointType.Arena_Reward, ArenaManager.RewardBoxRedCheck) + RPData:AddCheckFunc(RedPointType.Arena_Free, ArenaManager.FreeBattleRedCheck, FUNCTION_OPEN_TYPE.ARENA) + RPData:AddCheckFunc(RedPointType.Arena_Reward, ArenaManager.RewardBoxRedCheck, FUNCTION_OPEN_TYPE.ARENA) ---=== 商店相关红点 -- RPData:AddCheckFunc(RedPointType.Arena_Shop, ShopManager.ShopRedCheck) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua index bdb8c1b9de..f9feff170a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/SupremeHeroPopup.lua @@ -181,23 +181,9 @@ function SupremeHeroPopup:OnOpen(_fun) fun = _fun end -function this.ShowStory() - local isShowStory = 1 - if PlayerPrefs.HasKey("StoryMapPanel2"..PlayerManager.uid) then - isShowStory = PlayerPrefs.GetInt("StoryMapPanel2"..PlayerManager.uid) - end - if isShowStory == 1 then - Game.GlobalEvent:AddEvent(GameEvent.GuaJi.CloseStoryMapPanel,this.InitShowPanel) - PlayerPrefs.SetInt("StoryMapPanel2"..PlayerManager.uid,0) - StoryMapManager.InitData(3) - else - this.InitShowPanel() - end -end - function SupremeHeroPopup:OnShow() actIsDone = false - this.ShowStory() + this.InitShowPanel() end function this.InitShowPanel() diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua index 5cac837a41..ff59bdc63c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapManager.lua @@ -1,7 +1,7 @@ StoryMapManager = {} local this = StoryMapManager this.groupConfigs = {} -this.isShowStory = false +this.isShowStory = 0 local storyMapConfig = ConfigManager.GetConfig(ConfigName.StoryMapConfig) --初始化 function this.Initialize() diff --git a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua index 5ca000512d..e9cced3ffc 100644 --- a/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Story/StoryMapPanel.lua @@ -15,6 +15,8 @@ this.showDiaLog = false local lastLive2DId = 0 local sortingOrder = 0 local newSortingOrder = 0 +local isSkip = false +local isFirstEnter = 1 --初始化组件(用于子类重写) function StoryMapPanel:InitComponent() this.map = Util.GetGameObject(self.gameObject,"bg/mapParent") @@ -39,25 +41,30 @@ function StoryMapPanel:InitComponent() this.skip = Util.GetGameObject(self.gameObject,"bg/btnSkip") this.btnSkip = Util.GetGameObject(this.skip,"btnGo") - this.skip.gameObject:SetActive(false) + this.btnSkipBtnComp = Util.GetGameObject(this.skip,"btnGo"):GetComponent("Button") + this.skip.gameObject:SetActive(true) this.PlayerGrouops = {} this.Maps = {} - this.btnBack = Util.GetGameObject(self.gameObject,"btnBack") - this.btnBack.gameObject:SetActive(false) + this.mask = Util.GetGameObject(self.gameObject,"mask") + this.maskBtn = Util.GetGameObject(this.mask,"Button") + this.mask.gameObject:SetActive(false) end --绑定事件(用于子类重写) function StoryMapPanel:BindEvent() - Util.AddClick(this.btnBack, function () - this:ClosePanel() - end) Util.AddClick(this.btnSkip, function () - StoryMapManager.GetSingleStoryConfig() + --StoryMapManager.GetSingleStoryConfig() + isSkip = true + this:StackPop() end) Util.AddClick(this.btnGoOn, function () this:ShowDialog() end) + Util.AddClick(this.maskBtn, function () + this.mask.gameObject:SetActive(false) + this:StackPop() + end) end --添加事件监听(用于子类重写) @@ -76,6 +83,9 @@ end --界面打开时调用(用于子类重写) function StoryMapPanel:OnOpen(config) + this.mask.gameObject:SetActive(false) + this.map.transform.localPosition = Vector3.zero + --LogGreen("this.map.transform.localPosition:"..tostring(this.map.transform.localPosition)) sortingOrder = 0 this.PlayerGrouops = {} this.triggerEvent = {} @@ -150,6 +160,7 @@ function this:StackPop() this.callList:Pop()() else sortingOrder = newSortingOrder + this:OnClose() StoryMapManager.GetSingleStoryConfig() end end @@ -165,8 +176,25 @@ local pos = { } function this:CheckTrigger(data,go) + if isSkip then + LogGreen("data.eventType:"..tostring(data.eventType).." this.curEvent.eventType:"..tostring(this.curEvent.eventType)) + if (data.eventType == this.curEvent.eventType) then--(data.eventType ~= 3 and data.eventType ~= 1 and data.eventType ~= 2 and data.eventType ~= 10) or (data.eventType == this.curEvent.eventType) then + this:CloseDiaLog() + this:StackPop() + return + end + if this.curEvent.eventType == 2 then + for k,v in pairs(this.PlayerGrouops) do + v:StopAction() + end + end + if this.curEvent.eventType == 1 then + this:CloseDiaLog() + end + isSkip = false + end this.go = go - this.curEvent = data + this.curEvent = data if data.eventType == 1 then -- 1 对话 2跑图 3假战斗 this.eventIndex = 0 this:ShowDialog() @@ -181,6 +209,7 @@ function this:CheckTrigger(data,go) this.eventIndex = 0 --PopupTipPanel.ShowTip("符咒闪烁了一下") -- this:StackPop() + this.btnSkipBtnComp.enabled = false if not this.UI_Effect_ChuFaEffect_04 then this.UI_Effect_ChuFaEffect_04 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_04", PoolManager.AssetType.GameObject) this.UI_Effect_ChuFaEffect_04.name = "UI_Effect_ChuFaEffect_04" @@ -191,8 +220,11 @@ function this:CheckTrigger(data,go) this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(true) Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_04,newSortingOrder - sortingOrder) Timer.New(function() - this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(false) - this:StackPop() + if this.UI_Effect_ChuFaEffect_04 then + this.UI_Effect_ChuFaEffect_04.gameObject:SetActive(false) + this.btnSkipBtnComp.enabled = true + this:StackPop() + end end,data.groups[1],1,false):Start() elseif data.eventType == 5 then --符咒闪烁后消失 this.eventIndex = 0 @@ -202,6 +234,7 @@ function this:CheckTrigger(data,go) this:StackPop() elseif data.eventType == 6 then --符咒消失,金箍棒砸在主角和怪物中间。 this.eventIndex = 0 + this.btnSkipBtnComp.enabled = false if not this.UI_Effect_ChuFaEffect_01 then this.UI_Effect_ChuFaEffect_01 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_01", PoolManager.AssetType.GameObject) this.UI_Effect_ChuFaEffect_01.name = "UI_Effect_ChuFaEffect_01" @@ -212,13 +245,17 @@ function this:CheckTrigger(data,go) Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_01,newSortingOrder - sortingOrder) this.UI_Effect_ChuFaEffect_01.gameObject:SetActive(true) Timer.New(function() - this.UI_Effect_ChuFaEffect_01.gameObject:SetActive(false) + if this.UI_Effect_ChuFaEffect_01 then + this.UI_Effect_ChuFaEffect_01.gameObject:SetActive(false) + end + this.btnSkipBtnComp.enabled = true end,data.groups[1],1,false):Start() this:StackPop() --PopupTipPanel.ShowTip("符咒消失,金箍棒砸在主角和怪物中间。") -- this:StackPop() elseif data.eventType == 7 then this.eventIndex = 0 + this.btnSkipBtnComp.enabled = false --PopupTipPanel.ShowTip("随着光芒闪烁,一把从天而降的神剑插在了一只怪物面前。") if not this.UI_Effect_ChuFaEffect_02 then this.UI_Effect_ChuFaEffect_02 = poolManager:LoadAsset("UI_Effect_ChuFaEffect_02", PoolManager.AssetType.GameObject) @@ -251,11 +288,13 @@ function this:CheckTrigger(data,go) Timer.New(function() this.UI_Effect_ChuFaEffect_05.gameObject:SetActive(false) + this.btnSkipBtnComp.enabled = true this:StackPop() end,(data.groups[1] + 0.5 + 1),1,false):Start() --this:StackPop() elseif data.eventType == 8 then this.eventIndex = 0 + this.btnSkipBtnComp.enabled = false --PopupTipPanel.ShowTip("数把飞剑在主角身边依次落下,将身边一圈的怪物都扎死在剑下。随后剑放出光芒,形成环绕主角的法阵。") -- this:StackPop() if not this.effectBrowList then @@ -312,17 +351,33 @@ function this:CheckTrigger(data,go) Util.AddParticleSortLayer(this.UI_Effect_ChuFaEffect_03,newSortingOrder - sortingOrder) this.UI_Effect_ChuFaEffect_03.gameObject:SetActive(true) Timer.New(function() + this.btnSkipBtnComp.enabled = true this:StackPop() end,1.3,1,false):Start() end,data.groups[2],1,false):Start() elseif data.eventType == 9 then --等待几秒 this.eventIndex = 0 + this.btnSkipBtnComp.enabled = false Timer.New(function() + this.btnSkipBtnComp.enabled = true this:StackPop() end,data.groups[1],1,false):Start() elseif data.eventType == 10 then --保持某方向移动 this.eventIndex = 0 this:RunMap(data.eventType) + elseif data.eventType == 11 then --设置全屏遮罩,显示高亮位置点击区域 + this.eventIndex = 0 + this.mask.gameObject:SetActive(true) + this.maskBtn.transform.localPosition = Vector3.New(data.groups[1],data.groups[2],data.groups[3]) + elseif data.eventType == 12 then --光芒四射的特效 + --设置上一个特效为false + --加载光芒四射的特效 + this.eventIndex = 0 + this.btnSkipBtnComp.enabled = false + Timer.New(function() + this.btnSkipBtnComp.enabled = true + this:StackPop() + end,data.groups[1],1,false):Start() end end @@ -340,14 +395,18 @@ function this:EnterFight() end) end +function this:CloseDiaLog() + this.showDiaLog = false + this.dialog.gameObject:SetActive(false) + this.GoOn.gameObject:SetActive(false) + this.showImg:SetActive(false) + this.ReSetLive2d() +end + function this:ShowDialog() this.eventIndex = this.eventIndex + 1 if #this.curEvent.groups < this.eventIndex then - this.showDiaLog = false - this.dialog.gameObject:SetActive(false) - this.GoOn.gameObject:SetActive(false) - this.showImg:SetActive(false) - this.ReSetLive2d() + this:CloseDiaLog() if this.go then this.go:StackPop() this.go = nil @@ -375,7 +434,7 @@ function this:ShowDialog() local contexts =(contents[2]) contexts = string.gsub(contexts, Language[11248], NameManager.roleName) --this.diaLogNameText.text = "" - ShowText(this.diaLogContent.transform, contexts, 3) + ShowText(this.diaLogContent.transform, contexts, 1) this.SetList2d(resId,setId,live2dRoot) if not this.showDiaLog then PlayUIAnim(this.gameObject) @@ -438,11 +497,18 @@ function this:RunMap(indexType) this.startTimer:Stop() this.startTimer = nil end + local dua = 0 + if isFirstEnter == 1 then + isFirstEnter = 0 + dua = 0.1 + else + dua = 0 + end this.startTimer = Timer.New(function () for k,v in pairs(this.PlayerGrouops) do v:RunMap(indexType) end - end,0.1) + end,dua) this.startTimer:Start() if this.startTimer1 then @@ -465,7 +531,7 @@ function this:RunMap(indexType) end end,0.01,-1,false) Timer.New(function() - if this.startTimer then + if this.startTimer1 then this.startTimer1:Start() end end,0.2,1,false):Start() @@ -477,6 +543,7 @@ end --界面关闭时调用(用于子类重写) function StoryMapPanel:OnClose() + isFirstEnter = 1 for k,v in pairs(this.PlayerGrouops) do SubUIManager.Close(v) end @@ -492,6 +559,7 @@ function StoryMapPanel:OnClose() this.showImg:SetActive(false) this.ReSetLive2d() this.callList:Clear() + isSkip = false this.triggerEvent = {} if this.startTimer then this.startTimer:Stop() diff --git a/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua b/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua index 8b23eda0ad..08361f7f30 100644 --- a/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua +++ b/Assets/ManagedResources/~Lua/View/SingleStoryPlayerView.lua @@ -138,8 +138,10 @@ function SingleStoryPlayerView:RunMap(isSetRoleDir) self.state = 1 self.index = self.index + 1 self.roads = self.roadsList[self.index] - self.eventpoint = self.dirList[self.index] - self:SetRoleDir() + if self.dirList[self.index] ~= self.eventpoint then + self.eventpoint = self.dirList[self.index] + self:SetRoleDir() + end if not self.roads or #self.roads < 1 then self.state = 0 return @@ -153,11 +155,11 @@ function SingleStoryPlayerView:RunMap(isSetRoleDir) go = self.parent.map end local dis - LogGreen("isSetRoleDir:"..isSetRoleDir) + --LogGreen("isSetRoleDir:"..isSetRoleDir) if data.indexType == 2 or isSetRoleDir == 10 then - dis = math.abs(self:SetRoleDirAction(data.vec,go,false)) + dis = math.abs(self:SetRoleDirAction(data.vec,go.transform.localPosition,false)) else - dis = math.abs(self:SetRoleDirAction(data.vec,go,true)) + dis = math.abs(self:SetRoleDirAction(data.vec,go.transform.localPosition,true)) end local speed = 0 if data.indexType ~= 0 then @@ -165,8 +167,8 @@ function SingleStoryPlayerView:RunMap(isSetRoleDir) else speed = (1/550)*dis end - go.gameObject.transform:DOLocalMove(data.vec, speed, false):OnStart(function() end):OnUpdate(function() --TODO:测试速度 - --self:PlayStepSound() + self.tween = go.gameObject.transform:DOLocalMove(data.vec, speed, false):OnStart(function() end):OnUpdate(function() --TODO:测试速度 + --LogGreen("go.transform.localPosition:"..tostring(go.transform.localPosition)) end):OnComplete(function () if data.event and data.event.eventType > 0 then self:SetRoleDir() @@ -182,8 +184,8 @@ end -- 角色相关 function SingleStoryPlayerView:SetRoleDirAction(pos,go,indexType) - local du = pos.x - go.transform.localPosition.x - local dy = pos.y - go.transform.localPosition.y + local du = pos.x - go.x + local dy = pos.y - go.y if du > 0 then if indexType then self:SetWalkDir(WALK_DIR.RUN_RIGHT) @@ -231,7 +233,19 @@ function SingleStoryPlayerView:StackPop() end function SingleStoryPlayerView:StopAction() - + self.state = 0 + self.callList:Clear() + self.roadsIndex = #self.roads + if self.roadsIndex < 1 then + self:SetRoleDir() + else + local vec = self:SetRoleDirAction(self.roads[self.roadsIndex].vec,self.roads[1].vec,true) + if vec == 0 then + self.eventpoint = self.dirList[self.index] + self:SetWalkDir() + end + self.gameObject.transform.localPosition = self.roads[self.roadsIndex].vec + end end function SingleStoryPlayerView:OnClose() @@ -244,6 +258,9 @@ function SingleStoryPlayerView:OnClose() if self.playerLiveView then self.playerLiveView:OnClose() end + if self.tween then + self.tween:Kill() + end end function SingleStoryPlayerView:CheckState()