From 8945c191f36d9adb5fec390e8a40384f38c3cf36 Mon Sep 17 00:00:00 2001 From: SweetJJuya Date: Tue, 29 Oct 2024 19:43:07 +0900 Subject: [PATCH] 0.3.2.15 --- Assets/01.Scenes/_A.LMG.unity | 88 +++++++++++++++++-- Assets/02.Scripts/Ui/Tycoon/ManualBook.cs | 10 ++- .../02.Scripts/Ui/Tycoon/TycoonSelectCard.cs | 36 +++++--- Assets/02.Scripts/Ui/Tycoon/Upgrade_Popup.cs | 27 +++++- 4 files changed, 138 insertions(+), 23 deletions(-) diff --git a/Assets/01.Scenes/_A.LMG.unity b/Assets/01.Scenes/_A.LMG.unity index 27fbee98f..273f004ca 100644 --- a/Assets/01.Scenes/_A.LMG.unity +++ b/Assets/01.Scenes/_A.LMG.unity @@ -6271,7 +6271,7 @@ RectTransform: 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: -230} + m_AnchoredPosition: {x: 0, y: -230.00002} m_SizeDelta: {x: -80, y: -540} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &526767281 @@ -7521,7 +7521,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &604760079 RectTransform: m_ObjectHideFlags: 0 @@ -7541,6 +7541,7 @@ RectTransform: - {fileID: 66940596} - {fileID: 763144607} - {fileID: 1659131489} + - {fileID: 820345050} m_Father: {fileID: 1402684326} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -9571,6 +9572,81 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 5685570007726524012, guid: 7e6ba4001b3b92a4d8fdd586f6d0f731, type: 3} m_PrefabInstance: {fileID: 810401071} m_PrefabAsset: {fileID: 0} +--- !u!1 &820345049 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 820345050} + - component: {fileID: 820345052} + - component: {fileID: 820345051} + m_Layer: 0 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &820345050 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 820345049} + 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_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 604760079} + 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!114 &820345051 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 820345049} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + 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 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &820345052 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 820345049} + m_CullTransparentMesh: 1 --- !u!1001 &842924126 PrefabInstance: m_ObjectHideFlags: 0 @@ -20116,13 +20192,13 @@ MonoBehaviour: m_EditorClassIdentifier: SwitchMapsOpened: 2 SwitchMapsClosed: 1 - cocktailImage: {fileID: 0} - cocktailName: {fileID: 0} - manualCocktailsPrefabs: {fileID: 0} + cocktailImage: {fileID: 1526099411} + cocktailName: {fileID: 1464819522} + manualCocktailsPrefabs: {fileID: 6667137138327223632, guid: 52e209f6535e22848b973ed5de9cbc18, type: 3} slot01: {fileID: 463147984} slot02: {fileID: 598856408} slot03: {fileID: 2047705865} - ratioRange: {fileID: 0} + ratioRange: {fileID: 1285256878} --- !u!1001 &1645948246 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/02.Scripts/Ui/Tycoon/ManualBook.cs b/Assets/02.Scripts/Ui/Tycoon/ManualBook.cs index 5ee8f6068..43118a2f8 100644 --- a/Assets/02.Scripts/Ui/Tycoon/ManualBook.cs +++ b/Assets/02.Scripts/Ui/Tycoon/ManualBook.cs @@ -71,6 +71,7 @@ public class ManualBook : SwitchActionPopupUi for (int i = 0; i < _button.Count; i++) { _button[i].transform.SetSiblingIndex(i); + _button[i].transform.localScale = new Vector3(1.0f,1.0f,1.0f); } Update_Cocktails(); @@ -87,7 +88,13 @@ public class ManualBook : SwitchActionPopupUi public override void Close() { - base.Close(); + gameObject.SetActive(false); + PopupUiController.UnregisterPopup(this); + IsOpened = false; + PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed); + + if (!PopupUiController.IsPopupListEmpty()) return; + VisualFeedbackManager.Instance.ResetTimeScale(); } @@ -122,7 +129,6 @@ public class ManualBook : SwitchActionPopupUi element.transform.Find("Image").GetComponent().material = null; } } - } public void SelectedItem(ManualCocktailButton clickedButton) diff --git a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs index 43547e485..3a105a33a 100644 --- a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs +++ b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs @@ -6,7 +6,7 @@ using Random = UnityEngine.Random; namespace BlueWater.Uis { - public class TycoonSelectCard : MonoBehaviour + public class TycoonSelectCard : PopupUi { private GameObject _panel; private Camera uiCamera; @@ -50,14 +50,31 @@ namespace BlueWater.Uis { EventManager.OnLevelUp -= CreateCardEvent; } + + public override void Open() + { + transform.SetAsLastSibling(); + ShowUi(); + PopupUiController.RegisterPopup(this); + IsOpened = true; + VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f); + } + + public override void Close() + { + HideUi(); + PopupUiController.UnregisterPopup(this); + IsOpened = false; + + if (!PopupUiController.IsPopupListEmpty()) return; + + VisualFeedbackManager.Instance.ResetTimeScale(); + } [Button("카드 생성하기(레벨업)")] private void CreateCard() { - if (!Application.isPlaying) return; - - VisualFeedbackManager.Instance.SetBaseTimeScale(0f); - + if (!Application.isPlaying) return; // 기존 카드가 있으면 삭제 if (_currentCard01 != null) @@ -90,7 +107,7 @@ namespace BlueWater.Uis _tycoonCard02Componet = _currentCard02.GetComponent(); _tycoonCard03Componet = _currentCard03.GetComponent(); - ShowUi(); + Open(); //----카드 값 지정 및 초기화---- @@ -298,18 +315,13 @@ namespace BlueWater.Uis { Destroy(_currentCard03); } - - HideUi(); if (int.Parse(_lvData.Idx) % 5 == 0) { EventManager.InvokeUpgradeUi(_lvData); } - else - { - VisualFeedbackManager.Instance.ResetTimeScale(); - } + Close(); } public void ShowUi() => _panel.SetActive(true); diff --git a/Assets/02.Scripts/Ui/Tycoon/Upgrade_Popup.cs b/Assets/02.Scripts/Ui/Tycoon/Upgrade_Popup.cs index 3ebca0cee..1e95a926c 100644 --- a/Assets/02.Scripts/Ui/Tycoon/Upgrade_Popup.cs +++ b/Assets/02.Scripts/Ui/Tycoon/Upgrade_Popup.cs @@ -1,9 +1,10 @@ using System.Collections; using BlueWater; +using BlueWater.Uis; using UnityEngine; using UnityEngine.UI; -public class Upgrade_Popup : MonoBehaviour +public class Upgrade_Popup : PopupUi { [SerializeField] private GameObject _panel; @@ -24,6 +25,26 @@ public class Upgrade_Popup : MonoBehaviour { EventManager.OnUpgradeUi -= StartUpgradePopup; } + + public override void Open() + { + transform.SetAsLastSibling(); + ShowUi(); + PopupUiController.RegisterPopup(this); + IsOpened = true; + VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f); + } + + public override void Close() + { + HideUi(); + PopupUiController.UnregisterPopup(this); + IsOpened = false; + + if (!PopupUiController.IsPopupListEmpty()) return; + + VisualFeedbackManager.Instance.ResetTimeScale(); + } private void StartUpgradePopup(LevelData currentLevelData) { @@ -33,7 +54,7 @@ public class Upgrade_Popup : MonoBehaviour // ReSharper disable Unity.PerformanceAnalysis private IEnumerator StartUpgradePopupCoroutine(LevelData currentLevelData) { - ShowUi(); + Open(); float timer = 0f; while (timer < 1.0f) @@ -88,7 +109,7 @@ public class Upgrade_Popup : MonoBehaviour } VisualFeedbackManager.Instance.ResetTimeScale(); - HideUi(); + Close(); } public void ShowUi() => _panel.SetActive(true);