| Fight/Stage/Dungeon/AdventureStage.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/BossShow/BossShowModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/HazyRegion/HazyRegionModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/ItemTip/EquipTipWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| UI/Common/LayoutElementSizeClamp.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| UI/Common/LayoutElementSizeClamp.cs.meta | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Fight/Stage/Dungeon/AdventureStage.cs
@@ -31,45 +31,54 @@ private IEnumerator _Enter() { WindowCenter.Instance.Open<LoadingWin>(); WindowCenter.Instance.Open<LoadingWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); if (!AssetSource.sceneFromEditor) { AssetBundleUtility.Instance.Sync_LoadAll("maps/map000_xsdt"); AssetBundleUtility.Instance.Sync_LoadAll("maps/map140_qy"); } var _async = SceneManager.LoadSceneAsync("Map000_Xsdt", LoadSceneMode.Additive); var _async = SceneManager.LoadSceneAsync("Map140_Qy", LoadSceneMode.Additive); yield return _async; var _hero = PlayerDatas.Instance.hero; if (_hero != null) { _hero.Pos = new Vector3(188.49f, 62.512f, 23.85f); _hero.Pos = new Vector3(9.517f, 18.742f, 7.485f); } CameraController.Instance.Apply(); yield return null; WindowCenter.Instance.Close<LoadingWin>(); m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)hazyRegionModel.GetAdventureNpcId(), E_ActorGroup.FuncNpc); m_Npc.Pos = new Vector3(189.101f, 62.47324f, 26.147f); NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent; WindowCenter.Instance.Close<LoadingWin>(); WindowCenter.Instance.Open<MainInterfaceWin>(); BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent; BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent; if (onLoadAdventureStage != null) { onLoadAdventureStage(); } } } private void BossShowCompletedEvent() { m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)hazyRegionModel.GetAdventureNpcId(), E_ActorGroup.FuncNpc); m_Npc.Pos = new Vector3(9.012f, 18.76f, 9.089f); NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent; } private IEnumerator _Exit() { NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent; BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent; GAMgr.Instance.ServerDie(m_Npc.ServerInstID); GAMgr.Instance.Release(m_Npc); WindowCenter.Instance.Open<LoadingWin>(); WindowCenter.Instance.Close<MainInterfaceWin>(); var _async = SceneManager.UnloadSceneAsync("Map000_Xsdt"); var _async = SceneManager.UnloadSceneAsync("Map140_Qy"); yield return _async; if (!AssetSource.sceneFromEditor) { AssetBundleUtility.Instance.UnloadAssetBundle("maps/map000_xsdt", true, false); AssetBundleUtility.Instance.UnloadAssetBundle("maps/map140_qy", true, false); } var _hero = PlayerDatas.Instance.hero; if (_hero != null) System/BossShow/BossShowModel.cs
@@ -43,10 +43,19 @@ public void StartBossShow(int npcId) { if (!ActorShowConfig.GetActorShowModel(PlayerDatas.Instance.baseData.MapID, npcId, out actorShowModel)) { return; } Start(PlayerDatas.Instance.baseData.MapID, npcId); } public void Start(int mapId, int npcId) { try { reqDungeonLineId = -1; if (!ActorShowConfig.GetActorShowModel(PlayerDatas.Instance.baseData.MapID, npcId, out actorShowModel)) if (!ActorShowConfig.GetActorShowModel(mapId, npcId, out actorShowModel)) { return; } System/HazyRegion/HazyRegionModel.cs
@@ -92,6 +92,8 @@ private void OnLoadAdventureStage() { WindowCenter.Instance.Open<HazyAdventureHintWin>(); var dialogueConfig = AdventureDialogueConfig.Get(adventureDialogueId); BossShowModel.Instance.Start(0, dialogueConfig.npcId); } private void OnExitAdventureStage() System/ItemTip/EquipTipWin.cs
@@ -57,18 +57,23 @@ { if (EquipTipUtility.secondaryData != null) { m_MainWidgetGroup.SetActive(true); m_MainWidgetGroup.SetPosition(m_RightPoint.position); m_MainWidgetGroup.SetDynamicHeightActive(false); m_MainWidgetGroup.Display(EquipTipUtility.mainTipData); m_SecondaryWidgetGroup.SetActive(true); m_SecondaryWidgetGroup.SetPosition(m_LeftPoint.position); m_SecondaryWidgetGroup.SetDynamicHeightActive(false); m_SecondaryWidgetGroup.Display(EquipTipUtility.secondaryData); } else { m_MainWidgetGroup.SetActive(true); m_MainWidgetGroup.SetPosition(m_MiddlePoint.position); m_MainWidgetGroup.SetDynamicHeightActive(true); m_MainWidgetGroup.Display(EquipTipUtility.mainTipData); m_SecondaryWidgetGroup.SetActive(false); @@ -114,6 +119,7 @@ { public RectTransform container; public ScrollRect scrollRect; public LayoutElementSizeClamp sizeClamp; public TipEquipBaseInfoWidget baseInfoWidget; public TipBasePropertyWidget basePropertyWidget; public TipLegendPropertyWidget legendPropertyWidget; @@ -138,6 +144,16 @@ this.container.position = position; } public void SetDynamicHeightActive(bool active) { sizeClamp.clampEnable = active; if (!active) { var preferHeight = sizeClamp.clamp.maxY; sizeClamp.preferredHeight = preferHeight; } } public void Display(EquipTipUtility.TipData data) { scrollRect.verticalNormalizedPosition = 1f; UI/Common/LayoutElementSizeClamp.cs
New file @@ -0,0 +1,42 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; [ExecuteInEditMode] public class LayoutElementSizeClamp : LayoutElement { [SerializeField] bool m_ClampEnable; public bool clampEnable { get { return m_ClampEnable; } set { m_ClampEnable = value; } } [SerializeField] Clamp m_Clamp; public Clamp clamp { get { return m_Clamp; } } [SerializeField] RectTransform m_Target; Vector2 targetSizeRef = Vector2.zero; private void LateUpdate() { if (clampEnable && m_Target != null) { if (targetSizeRef != m_Target.sizeDelta) { preferredHeight = Mathf.Clamp(m_Target.rect.height, m_Clamp.minY, m_Clamp.maxY); preferredWidth = Mathf.Clamp(m_Target.rect.width, m_Clamp.minX, m_Clamp.maxX); targetSizeRef = new Vector2(preferredWidth, preferredHeight); } } } [System.Serializable] public struct Clamp { public float minX; public float maxX; public float minY; public float maxY; } } UI/Common/LayoutElementSizeClamp.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 2d8fad63d37034e4aad43225bd89f61c timeCreated: 1555667898 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: