From 10ef0313928493f8c62a53b4a8c02b111e71e58e Mon Sep 17 00:00:00 2001 From: Ino Date: Fri, 7 Nov 2025 15:49:16 +0900 Subject: [PATCH] =?UTF-8?q?"=EC=9E=AC=ED=99=94=20=EB=8B=A4=20=EC=93=B0?= =?UTF-8?q?=EB=A9=B4=20=EC=A7=80=EA=B8=88=205=EA=B0=9C=EA=B0=80=20?= =?UTF-8?q?=ED=92=80=EB=A1=9C=20=EC=B6=A9=EC=A0=84=EB=90=98=EB=8A=94?= =?UTF-8?q?=EB=8D=B0=201=EA=B0=9C=EB=A7=8C=20=EC=B6=A9=EC=A0=84=EB=90=98?= =?UTF-8?q?=EA=B3=A0,=2030=EC=B4=88=EB=A7=88=EB=8B=A4=201=EA=B0=9C?= =?UTF-8?q?=EC=94=A9=20=EC=B6=A9=EC=A0=84=EB=90=98=EC=84=9C=20=EC=B5=9C?= =?UTF-8?q?=EB=8C=80=205=EA=B0=9C=EA=B9=8C=EC=A7=80=20=EC=B6=A9=EC=A0=84?= =?UTF-8?q?=EB=90=98=EA=B2=8C=20=EC=88=98=EC=A0=95=20=EA=B0=80=EB=8A=A5?= =?UTF-8?q?=ED=95=A0=EA=B9=8C=EC=9A=94=3F=20(=20=EB=AF=B8=EB=8B=88?= =?UTF-8?q?=EA=B2=8C=EC=9E=84=20=ED=8C=A8=ED=82=A4=EC=A7=80=EB=A5=BC=20?= =?UTF-8?q?=EC=95=88=EC=82=AC=EB=8F=84=20=EB=B6=88=ED=8E=B8=ED=95=A8?= =?UTF-8?q?=EC=9D=B4=20=EA=B1=B0=EC=9D=98=20=EC=97=86=EC=96=B4=EC=84=9C=20?= =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=EB=A5=BC=20=EC=95=88=EC=82=B4?= =?UTF-8?q?=EA=B1=B0=20=EA=B0=99=EC=95=84=EC=84=9C=20=EC=9E=85=EB=8B=88?= =?UTF-8?q?=EB=8B=A4.)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scenes/SampleScene.unity | 28 +++++++--- Assets/Scripts/AttachToGameObject/ADInfo.cs | 2 +- Assets/Scripts/UI/LobbyUI.cs | 60 +++++++++++---------- 3 files changed, 55 insertions(+), 35 deletions(-) diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 03de4e9..ba5f00d 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -19062,6 +19062,10 @@ PrefabInstance: propertyPath: m_Name value: Sparkle_ellow objectReference: {fileID: 0} + - target: {fileID: 4033412786151888123, guid: 49057b33ea71fbb4da4e8f02a8db9f28, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4123381426564554493, guid: 49057b33ea71fbb4da4e8f02a8db9f28, type: 3} propertyPath: m_Materials.Array.size value: 1 @@ -31912,8 +31916,8 @@ RectTransform: m_Children: - {fileID: 495464322} - {fileID: 1456577417} - - {fileID: 952113712} - {fileID: 855260481} + - {fileID: 952113712} - {fileID: 1784439583} - {fileID: 662108378} m_Father: {fileID: 1861711112} @@ -32300,6 +32304,10 @@ PrefabInstance: propertyPath: m_Name value: Shine_pink objectReference: {fileID: 0} + - target: {fileID: 4109064841345302812, guid: 2a409ab125c5216449bc5f005ec045f0, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 4109064841345302813, guid: 2a409ab125c5216449bc5f005ec045f0, type: 3} propertyPath: m_LocalScale.x value: 50 @@ -35626,6 +35634,10 @@ PrefabInstance: propertyPath: m_Name value: Shine_ellow objectReference: {fileID: 0} + - target: {fileID: 7938384439400024403, guid: b6e54acc881a03c4a9719b161a25a3e3, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] m_AddedGameObjects: [] @@ -57758,6 +57770,10 @@ PrefabInstance: propertyPath: m_Name value: Shine_blue objectReference: {fileID: 0} + - target: {fileID: 245581523800709616, guid: 9442d241d2d8ecc47b49f256b55325c6, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 245581523800709617, guid: 9442d241d2d8ecc47b49f256b55325c6, type: 3} propertyPath: m_LocalScale.x value: 50 @@ -67213,9 +67229,7 @@ MonoBehaviour: - {fileID: 278813020} - {fileID: 2057533035} - {fileID: 1227751126} - gos_minigame: - - {fileID: 168358557} - - {fileID: 2079832695} + go_minigamechargingbtn: {fileID: 2079832695} slider_minigamecharging: {fileID: 404172103} t_minigamechargingtime: {fileID: 644731195} m_AttandanceUI: {fileID: 388368217} @@ -68421,7 +68435,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1} - m_RaycastTarget: 1 + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: @@ -80539,8 +80553,8 @@ MonoBehaviour: - {fileID: 1988220643} - {fileID: 495464323} - {fileID: 1456577418} - - {fileID: 952113713} - {fileID: 855260482} + - {fileID: 952113713} - {fileID: 1044263884} --- !u!1 &2014651059 GameObject: @@ -83046,7 +83060,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 + m_RaycastTarget: 0 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: diff --git a/Assets/Scripts/AttachToGameObject/ADInfo.cs b/Assets/Scripts/AttachToGameObject/ADInfo.cs index 975d2dc..af54e34 100644 --- a/Assets/Scripts/AttachToGameObject/ADInfo.cs +++ b/Assets/Scripts/AttachToGameObject/ADInfo.cs @@ -142,7 +142,7 @@ public class ADInfo : MonoBehaviourSingletonTemplate, // =========================================================== public void OnUnityAdsShowComplete(string placementId, UnityAdsShowCompletionState showCompletionState) { - if (placementId == placement_Rewarded && showCompletionState == UnityAdsShowCompletionState.COMPLETED) + if (showCompletionState == UnityAdsShowCompletionState.COMPLETED) GetReward = 1; else GetReward = 2; diff --git a/Assets/Scripts/UI/LobbyUI.cs b/Assets/Scripts/UI/LobbyUI.cs index 2d72dee..97ced54 100644 --- a/Assets/Scripts/UI/LobbyUI.cs +++ b/Assets/Scripts/UI/LobbyUI.cs @@ -6,7 +6,7 @@ using UnityEngine.UI; public class LobbyUI : MonoBehaviourSingletonTemplate { [SerializeField] TextMeshProUGUI[] texts_money; // 0 앨범 개방 재화, 1 채팅 재화, 2 뽑기 재화, 3 4 미니게임 체력 - public GameObject[] gos_minigame; // 0 입장, 1 차징 + public GameObject go_minigamechargingbtn; public Slider slider_minigamecharging; public TextMeshProUGUI t_minigamechargingtime; float minigamechargingTime = 0f; @@ -35,30 +35,31 @@ public class LobbyUI : MonoBehaviourSingletonTemplate public Image[] images_botbtn; // 0 앨범, 1 상점 int CurMenu = 2; + bool bUpdate = false; IEnumerator Start() { + bUpdate = false; + yield return null; if (SaveMgr.Ins.CanGet_Attandance()) m_AttandanceUI.Set(); ADInfo.Ins.Set_Banner(true); m_LobbyCenterProfileUI.Set(); minigamechargingTime = (float)(SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time).TotalMilliseconds * 0.001f; - DSUtil.InActivateGameObjects(gos_minigame, minigamechargingTime > 0f ? 1 : 0); - //Act_Repeat_for1sec = () => - //{ - // if (SaveMgr.Ins.Get_Money(eMoney.MiniGameHP) <= 0) - // { - // var cal = - // } - //}; + go_minigamechargingbtn.SetActive(minigamechargingTime > 0f); + if (minigamechargingTime <= 0f) Check_MiniGameCharging(); + + bUpdate = true; } protected override void Update() { base.Update(); + if (!bUpdate) return; + var cal = SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time; - if ((cal.TotalMilliseconds > 0 || minigamechargingTime > 0) && !SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, false)) + if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, table_GlobalValue.Ins.Get_Int("MiniGame_TotalEnterMoney"), false)) { minigamechargingTime -= Time.deltaTime; t_minigamechargingtime.text = minigamechargingTime > 0f ? $"{minigamechargingTime:F2}s" : "0s"; @@ -66,20 +67,30 @@ public class LobbyUI : MonoBehaviourSingletonTemplate slider_minigamecharging.value = DSUtil.Get_SliderValue(minigamechargingTime / fRefillTimeMax); if (cal.TotalSeconds <= 0 && minigamechargingTime <= 0f) - MiniGameAllCharging(); + MiniGameCharging(); } - else if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, false)) - MiniGameAllCharging(); } - void MiniGameAllCharging() + void MiniGameCharging() { - SaveMgr.Ins.Set_Money(eMoney.MiniGameHP, table_GlobalValue.Ins.Get_Int("MiniGame_TotalEnterMoney")); - SaveMgr.Ins.Save(); - m_ToastUI.Set($"미니게임 체력이 모두 충전되었습니다."); - if (CurMenu == 2) - DSUtil.InActivateGameObjects(gos_minigame, minigamechargingTime > 0f ? 1 : 0); - + SaveMgr.Ins.Add_Money(eMoney.MiniGameHP); + m_ToastUI.Set($"미니게임 체력이 충전되었습니다."); + Check_MiniGameCharging(); Set_Money(); + SaveMgr.Ins.Save(); + } + void Check_MiniGameCharging() + { + if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, table_GlobalValue.Ins.Get_Int("MiniGame_TotalEnterMoney"), false)) + { + var cal = SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time; + if (cal.TotalMilliseconds <= 0f) + { + SaveMgr.Ins.Set_MiniGameTime(); + minigamechargingTime = table_GlobalValue.Ins.Get_Int("MiniGame_EnterMoney_Time"); + } + } + + if (CurMenu == 2) go_minigamechargingbtn.SetActive(minigamechargingTime > 0f); } public void OnClick_Button(GameObject btn) @@ -161,12 +172,7 @@ public class LobbyUI : MonoBehaviourSingletonTemplate public void MiniGameResult() { SaveMgr.Ins.Add_Money(eMoney.MiniGameHP, -1); - if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, false)) - { - SaveMgr.Ins.Set_MiniGameTime(); - minigamechargingTime = table_GlobalValue.Ins.Get_Int("MiniGame_EnterMoney_Time"); - DSUtil.InActivateGameObjects(gos_minigame, 1); - } + Check_MiniGameCharging(); } public void Go_Home() @@ -176,7 +182,7 @@ public class LobbyUI : MonoBehaviourSingletonTemplate m_GachaUI.gameObject.SetActive(false); go_shop.SetActive(false); DSUtil.ActivateGameObjects(gos_homeBot); - DSUtil.InActivateGameObjects(gos_minigame, minigamechargingTime > 0f ? 1 : 0); + go_minigamechargingbtn.SetActive(minigamechargingTime > 0f); } public void Go_Album(int girlid)