From 7e275c029c9b05f23ecfebc654fe17170ba9c3ad Mon Sep 17 00:00:00 2001 From: 99jamin <99jamin56@gmail.com> Date: Wed, 19 Mar 2025 17:47:49 +0900 Subject: [PATCH 1/5] =?UTF-8?q?DO-37=20[Feat]=20=EC=83=81=EC=A0=90=20?= =?UTF-8?q?=EC=9D=BC=EB=B0=98=20=EA=B5=AC=EB=A7=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 일반 구매 구현 및 UI 적용 --- Assets/KJM/Admob/AdManager.cs | 1 - Assets/KJM/Admob/Admob.prefab | 46 ------- Assets/KJM/Admob/Admob.prefab.meta | 7 -- .../ScrollItem/RankingScrollItem.prefab | 4 +- .../ScrollItem/ShopScrollItem.prefab | 27 +++-- Assets/KJM/KJMprefabs/Shop Panel.prefab | 2 +- Assets/KJM/KimJaeMin.unity | 64 ---------- .../KJM/ShopTest/MainPanelButtonController.cs | 37 ------ .../MainPanelButtonController.cs.meta | 11 -- Assets/KJM/ShopTest/ShopTestKJM.unity | 114 ++++++++---------- .../Prefabs/Panels/Main Panel.prefab | 50 ++++++-- Assets/Script/Common/CoinsPanelController.cs | 4 +- Assets/Script/Common/ScrollItem/ShopItem.cs | 2 +- Assets/Script/Main/NetworkManager.cs | 44 ++++--- Assets/Script/Main/UserManager.cs | 32 +++++ .../ShopItemController.cs | 23 +++- .../Script/UI/PanelController/PanelManager.cs | 17 ++- 17 files changed, 200 insertions(+), 285 deletions(-) delete mode 100644 Assets/KJM/Admob/Admob.prefab delete mode 100644 Assets/KJM/Admob/Admob.prefab.meta delete mode 100644 Assets/KJM/ShopTest/MainPanelButtonController.cs delete mode 100644 Assets/KJM/ShopTest/MainPanelButtonController.cs.meta diff --git a/Assets/KJM/Admob/AdManager.cs b/Assets/KJM/Admob/AdManager.cs index 6edcbc6..71def8d 100644 --- a/Assets/KJM/Admob/AdManager.cs +++ b/Assets/KJM/Admob/AdManager.cs @@ -30,7 +30,6 @@ public class AdManager : MonoBehaviour return; } - Debug.Log("보상형 전면 광고 로드 성공"); rewardedInterstitialAd = ad; // 광고 종료 이벤트 설정 diff --git a/Assets/KJM/Admob/Admob.prefab b/Assets/KJM/Admob/Admob.prefab deleted file mode 100644 index 19990cc..0000000 --- a/Assets/KJM/Admob/Admob.prefab +++ /dev/null @@ -1,46 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &8786799901643631561 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7455536569977767830} - - component: {fileID: 2424336103342601865} - m_Layer: 0 - m_Name: Admob - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &7455536569977767830 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8786799901643631561} - serializedVersion: 2 - 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: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &2424336103342601865 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8786799901643631561} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 644acbaf5d5791242b26c1b1b0a0ceeb, type: 3} - m_Name: - m_EditorClassIdentifier: diff --git a/Assets/KJM/Admob/Admob.prefab.meta b/Assets/KJM/Admob/Admob.prefab.meta deleted file mode 100644 index 57160ff..0000000 --- a/Assets/KJM/Admob/Admob.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c401513426cb83c4e8759c73d8be4c3a -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/KJM/KJMprefabs/ScrollItem/RankingScrollItem.prefab b/Assets/KJM/KJMprefabs/ScrollItem/RankingScrollItem.prefab index d9cca60..8f676ac 100644 --- a/Assets/KJM/KJMprefabs/ScrollItem/RankingScrollItem.prefab +++ b/Assets/KJM/KJMprefabs/ScrollItem/RankingScrollItem.prefab @@ -413,8 +413,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: c06da2c324d0fee43b8b1998cf9fcd09, type: 3} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: 05a670e614d7817429ee256ceb7efbe6, type: 3} + m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 diff --git a/Assets/KJM/KJMprefabs/ScrollItem/ShopScrollItem.prefab b/Assets/KJM/KJMprefabs/ScrollItem/ShopScrollItem.prefab index bf0ab54..7768394 100644 --- a/Assets/KJM/KJMprefabs/ScrollItem/ShopScrollItem.prefab +++ b/Assets/KJM/KJMprefabs/ScrollItem/ShopScrollItem.prefab @@ -34,8 +34,8 @@ RectTransform: 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: -25, y: 0} - m_SizeDelta: {x: 200, y: 100} + m_AnchoredPosition: {x: 0.5, y: 0} + m_SizeDelta: {x: 250, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8644449565768019552 CanvasRenderer: @@ -168,8 +168,8 @@ RectTransform: 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: 176.9, y: 0} - m_SizeDelta: {x: 200, y: 100} + m_AnchoredPosition: {x: 200, y: 0} + m_SizeDelta: {x: 160, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7968533753814083057 CanvasRenderer: @@ -356,6 +356,7 @@ GameObject: - component: {fileID: 5750108967662755581} - component: {fileID: 6941609111617388457} - component: {fileID: -8178793116256795857} + - component: {fileID: 1941271810694746857} m_Layer: 5 m_Name: ShopScrollItem m_TagString: Untagged @@ -413,8 +414,8 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: c06da2c324d0fee43b8b1998cf9fcd09, type: 3} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: 05a670e614d7817429ee256ceb7efbe6, type: 3} + m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -491,5 +492,15 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 4d28917ad20c19e428cbf98ba5609e69, type: 3} m_Name: m_EditorClassIdentifier: - profileSprites: - - {fileID: 21300000, guid: 307bff9630735f342852f28b1cd5d300, type: 3} +--- !u!114 &1941271810694746857 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7605012172595602668} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 644acbaf5d5791242b26c1b1b0a0ceeb, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/KJM/KJMprefabs/Shop Panel.prefab b/Assets/KJM/KJMprefabs/Shop Panel.prefab index 198df59..e5004b7 100644 --- a/Assets/KJM/KJMprefabs/Shop Panel.prefab +++ b/Assets/KJM/KJMprefabs/Shop Panel.prefab @@ -350,7 +350,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 1} - m_AnchoredPosition: {x: -392, y: -56.72364} + m_AnchoredPosition: {x: -392, y: -5.317383} m_SizeDelta: {x: 784, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &2389273839879143832 diff --git a/Assets/KJM/KimJaeMin.unity b/Assets/KJM/KimJaeMin.unity index 3eb83e9..9f52925 100644 --- a/Assets/KJM/KimJaeMin.unity +++ b/Assets/KJM/KimJaeMin.unity @@ -294,12 +294,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 03aef985a8b802a409630fdcab7be09b, type: 3} m_Name: m_EditorClassIdentifier: - settingsPanel: {fileID: 2861881646994438329, guid: ea820246b5075c54d9f614291ca41c5d, type: 3} - confirmPanel: {fileID: 8145365568262946399, guid: 76f1fe6b5243faf4f9b8caee7312d336, type: 3} - rankingPanel: {fileID: 154459105952450598, guid: bf4bb18aa323fe748b3eb1d537503596, type: 3} - shopPanel: {fileID: 8190964574954487140, guid: eb257b0a685b2254f860f294ce8cba54, type: 3} - giboPanel: {fileID: 3090474328172188941, guid: c63914e01332f8d479ada92325335e41, type: 3} - _canvas: {fileID: 6741227126671320411} --- !u!222 &71273024816384741 CanvasRenderer: m_ObjectHideFlags: 0 @@ -347,63 +341,6 @@ MonoBehaviour: m_DefaultSpriteDPI: 96 m_DynamicPixelsPerUnit: 1 m_PresetInfoIsWorld: 0 ---- !u!1001 &523594383261405864 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8786799901643631561, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_Name - value: Admob - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} --- !u!1 &658145525140724706 GameObject: m_ObjectHideFlags: 0 @@ -1747,4 +1684,3 @@ SceneRoots: - {fileID: 656468223} - {fileID: 937655098394579964} - {fileID: 1842188762} - - {fileID: 523594383261405864} diff --git a/Assets/KJM/ShopTest/MainPanelButtonController.cs b/Assets/KJM/ShopTest/MainPanelButtonController.cs deleted file mode 100644 index e517ca0..0000000 --- a/Assets/KJM/ShopTest/MainPanelButtonController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -/// -/// 메인 패널 메뉴 버튼 -/// -public class MainPanelButtonController : MonoBehaviour -{ - //상점 패널 생성 - public void OnShopPanelClick() - { - List shopItems = new List(); //상점 데이터 리스트 생성 - for (int i = 0; i < 5; i++) - { - if (i == 0) //광고 항목 - { - ShopItem shopItem = new ShopItem - { - Name = "코인500개 ", - Price = "광고" - }; - shopItems.Add(shopItem); - } - else - { - ShopItem shopItem = new ShopItem - { - Name = "코인"+i*1000+"개 ", - Price = (i * 1000)+ "원" - }; - shopItems.Add(shopItem); - } - } - - GameManager.Instance.panelManager.OpenShopPanel(shopItems); - } -} diff --git a/Assets/KJM/ShopTest/MainPanelButtonController.cs.meta b/Assets/KJM/ShopTest/MainPanelButtonController.cs.meta deleted file mode 100644 index 2ef9d04..0000000 --- a/Assets/KJM/ShopTest/MainPanelButtonController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c9598d78723880e4f8026beb096f28c4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/KJM/ShopTest/ShopTestKJM.unity b/Assets/KJM/ShopTest/ShopTestKJM.unity index 084adda..dda09c9 100644 --- a/Assets/KJM/ShopTest/ShopTestKJM.unity +++ b/Assets/KJM/ShopTest/ShopTestKJM.unity @@ -248,17 +248,8 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 35a4c6d5d3a97b444b968e68ec8bb9f7, type: 3} m_Name: m_EditorClassIdentifier: - mainPanel: {fileID: 8564394481744056992, guid: e1835a90a4d722a4b99be61179de8789, type: 3} - signinPanel: {fileID: 925522282249935710, guid: e14c9b2925f0ddb4192af743e5cc166a, type: 3} - signupPanel: {fileID: 3181524094944658765, guid: 8827fe7caa3145e40b1369cc42f8697d, type: 3} - settingsPanel: {fileID: 2861881646994438329, guid: ea820246b5075c54d9f614291ca41c5d, type: 3} - confirmPanel: {fileID: 8145365568262946399, guid: 76f1fe6b5243faf4f9b8caee7312d336, type: 3} - rankingPanel: {fileID: 154459105952450598, guid: bf4bb18aa323fe748b3eb1d537503596, type: 3} - shopPanel: {fileID: 8190964574954487140, guid: eb257b0a685b2254f860f294ce8cba54, type: 3} - giboPanel: {fileID: 3090474328172188941, guid: c63914e01332f8d479ada92325335e41, type: 3} - loadingPanel: {fileID: 1942997847427067673, guid: 634a60576b4855940a97d1e7447b9fcc, type: 3} - mainBgm: {fileID: 8300000, guid: 1d9c7fb20aa822c48933d00b6bd6a757, type: 3} - profileSprites: [] + panelManagerPrefab: {fileID: 3475740041361426276, guid: 085ca07ca90c92545b2594bd13412701, type: 3} + audioManagerPrefab: {fileID: 2946408323859178723, guid: e829818dce39a5d4383e061111bed871, type: 3} --- !u!224 &183715513 RectTransform: m_ObjectHideFlags: 0 @@ -346,63 +337,52 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1001 &634833532 -PrefabInstance: +--- !u!1 &1280076947 +GameObject: m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1280076949} + - component: {fileID: 1280076948} + m_Layer: 0 + m_Name: MainPanelManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1280076948 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1280076947} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0696b08f74b24325a7b378405f6170af, type: 3} + m_Name: + m_EditorClassIdentifier: + loadingPanelController: {fileID: 1454248679793356470, guid: 634a60576b4855940a97d1e7447b9fcc, type: 3} + mainPanelController: {fileID: 7488082087611091670, guid: e1835a90a4d722a4b99be61179de8789, type: 3} +--- !u!4 &1280076949 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1280076947} serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7455536569977767830, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 8786799901643631561, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} - propertyPath: m_Name - value: Admob - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: c401513426cb83c4e8759c73d8be4c3a, type: 3} + 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: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1340395578 GameObject: m_ObjectHideFlags: 0 @@ -604,4 +584,4 @@ SceneRoots: - {fileID: 183715513} - {fileID: 1340395582} - {fileID: 521295933} - - {fileID: 634833532} + - {fileID: 1280076949} diff --git a/Assets/Resources/Prefabs/Panels/Main Panel.prefab b/Assets/Resources/Prefabs/Panels/Main Panel.prefab index 81eb895..772b7a5 100644 --- a/Assets/Resources/Prefabs/Panels/Main Panel.prefab +++ b/Assets/Resources/Prefabs/Panels/Main Panel.prefab @@ -120,7 +120,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 3015309825845733259} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 8890768496808647529} + m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp + m_MethodName: OnRankingPanelClick + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &683375887058748135 GameObject: m_ObjectHideFlags: 0 @@ -375,7 +387,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 6468719718473664808} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 8890768496808647529} + m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp + m_MethodName: OpenSettingsPanel + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &1637449823560643887 GameObject: m_ObjectHideFlags: 0 @@ -453,7 +477,7 @@ MonoBehaviour: m_GameObject: {fileID: 1637449823560643887} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: c9598d78723880e4f8026beb096f28c4, type: 3} + m_Script: {fileID: 11500000, guid: 03aef985a8b802a409630fdcab7be09b, type: 3} m_Name: m_EditorClassIdentifier: --- !u!1 &2440131775796007731 @@ -846,7 +870,7 @@ MonoBehaviour: m_PersistentCalls: m_Calls: - m_Target: {fileID: 8890768496808647529} - m_TargetAssemblyTypeName: MainPanelButtonController, Assembly-CSharp + m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp m_MethodName: OnShopPanelClick m_Mode: 1 m_Arguments: @@ -1093,7 +1117,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "16\uAE09" + m_text: "18\uAE09" m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2} @@ -1282,7 +1306,19 @@ MonoBehaviour: m_TargetGraphic: {fileID: 5553341337845712589} m_OnClick: m_PersistentCalls: - m_Calls: [] + m_Calls: + - m_Target: {fileID: 8890768496808647529} + m_TargetAssemblyTypeName: PanelManager, Assembly-CSharp + m_MethodName: OpenReplayPanel + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 --- !u!1 &4348816988605791720 GameObject: m_ObjectHideFlags: 0 @@ -1678,7 +1714,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "\uD14C\uC2A4\uD2B801" + m_text: kjm m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2} diff --git a/Assets/Script/Common/CoinsPanelController.cs b/Assets/Script/Common/CoinsPanelController.cs index 45d06af..ebd013c 100644 --- a/Assets/Script/Common/CoinsPanelController.cs +++ b/Assets/Script/Common/CoinsPanelController.cs @@ -66,7 +66,7 @@ public class CoinsPanelController : MonoBehaviour if (isAdd) { var currentHeartCount = coinsCountText.text; - coinsCountText.text = (int.Parse(currentHeartCount) + 100).ToString(); + coinsCountText.text = (int.Parse(currentHeartCount) + 500).ToString(); // 코인 텍스트 100씩 증가 } else @@ -99,7 +99,7 @@ public class CoinsPanelController : MonoBehaviour Sequence sequence = DOTween.Sequence(); // i += a 반복 횟수 조절, 100개 단위로 상승 차감 시 100으로 설정 - for (int i = 0; i < coinsCount; i+=100) + for (int i = 0; i < coinsCount; i+=500) { sequence.AppendCallback(() => { diff --git a/Assets/Script/Common/ScrollItem/ShopItem.cs b/Assets/Script/Common/ScrollItem/ShopItem.cs index da665a5..0959f2a 100644 --- a/Assets/Script/Common/ScrollItem/ShopItem.cs +++ b/Assets/Script/Common/ScrollItem/ShopItem.cs @@ -5,5 +5,5 @@ using UnityEngine; public class ShopItem { public string Name; - public string Price; + public int Price; } diff --git a/Assets/Script/Main/NetworkManager.cs b/Assets/Script/Main/NetworkManager.cs index 863f55f..03e71e8 100644 --- a/Assets/Script/Main/NetworkManager.cs +++ b/Assets/Script/Main/NetworkManager.cs @@ -376,20 +376,29 @@ public class NetworkManager : Singleton } } - //코인 구매 함수 - public void PurchaseCoins(Action success, Action failure) + + /// + /// 코인 구매 함수 + /// + /// 충전양 + /// 결제ID(??) + /// 결제타입(카드,구글페이) + /// + /// + public void PurchaseCoins(int amount, string paymentId, string paymentType, Action success, Action failure) { - StartCoroutine(PurchaseCoinsCoroutine(success, failure)); + StartCoroutine(PurchaseCoinsCoroutine(amount, paymentId, paymentType, success, failure)); } - private IEnumerator PurchaseCoinsCoroutine(Action success, Action failure) + private IEnumerator PurchaseCoinsCoroutine(int amount, string paymentId, string paymentType, Action success, Action failure) { - string jsonString = "{\"adCompleted\": true}"; //테스트를 위해 ture로 설정 - byte[] bodyRaw = System.Text.Encoding.UTF8.GetBytes(jsonString); + string url = Constants.ServerURL + "/coins/purchase"; // 서버 엔드포인트 + PurchaseData purchaseData = new PurchaseData(amount, paymentId, paymentType); + string jsonString = JsonUtility.ToJson(purchaseData); - using (UnityWebRequest www = - new UnityWebRequest(Constants.ServerURL + "/coins/recharge/ad", UnityWebRequest.kHttpVerbPOST)) + using (UnityWebRequest www = new UnityWebRequest(url, UnityWebRequest.kHttpVerbPOST)) { + byte[] bodyRaw = System.Text.Encoding.UTF8.GetBytes(jsonString); www.uploadHandler = new UploadHandlerRaw(bodyRaw); www.downloadHandler = new DownloadHandlerBuffer(); www.SetRequestHeader("Content-Type", "application/json"); @@ -408,26 +417,29 @@ public class NetworkManager : Singleton yield return www.SendWebRequest(); - if (www.result == UnityWebRequest.Result.ConnectionError || - www.result == UnityWebRequest.Result.ProtocolError) + if (www.result == UnityWebRequest.Result.ConnectionError || www.result == UnityWebRequest.Result.ProtocolError) { - Debug.Log("광고 시청 후 코인 충전 실패: " + www.error); + Debug.LogError("결제 요청 실패: " + www.error); failure?.Invoke(); } else { var result = www.downloadHandler.text; - var rechargeResult = JsonUtility.FromJson(result); + var purchaseResult = JsonUtility.FromJson(result); - if (rechargeResult.result == "SUCCESS") + if (purchaseResult.result == "SUCCESS") { - Debug.Log("광고 시청으로 코인 충전 완료: " + rechargeResult.recharged); + Debug.Log($"결제 완료! {purchaseResult.purchased} 코인 충전됨, 현재 코인: {purchaseResult.currentCoins}"); + + // 유저 데이터 갱신 UserManager.Instance.SetCoinsInfo(); - success?.Invoke(rechargeResult.recharged); + + // 최신 코인 개수를 성공 콜백으로 전달 + success?.Invoke(purchaseResult.purchased); } else { - Debug.Log("광고 시청 후 충전 실패: " + rechargeResult.result); + Debug.LogError("결제 후 코인 충전 실패: " + purchaseResult.result); failure?.Invoke(); } } diff --git a/Assets/Script/Main/UserManager.cs b/Assets/Script/Main/UserManager.cs index 6719157..83fff14 100644 --- a/Assets/Script/Main/UserManager.cs +++ b/Assets/Script/Main/UserManager.cs @@ -20,6 +20,19 @@ public class CoinsInfoResult public int coins; } +/// +/// 코인 구매 응답 클래스 +/// +public class CoinsPurchaseResult +{ + public string result; + public string message; + public int purchased; // 충전된 코인량 + public int currentCoins; // 현재 보유 코인량 +} +/// +/// 광고 시청 응답 클래스 +/// public class CoinsAdResult { public string result; @@ -28,6 +41,25 @@ public class CoinsAdResult public int currentCoins; // 현재 보유 코인량 } +/// +/// 코인 구매 요청 데이터 클래스 +/// +public class PurchaseData +{ + public int amount; + public string paymentId; + public string paymentType; + + public PurchaseData(int amount, string paymentId, string paymentType) + { + this.amount = amount; + this.paymentId = paymentId; + this.paymentType = paymentType; + } +} + + + public class UserManager : Singleton { public string UserId { get; private set; } diff --git a/Assets/Script/UI/PanelChildController/ShopItemController.cs b/Assets/Script/UI/PanelChildController/ShopItemController.cs index bb4cef0..87e4403 100644 --- a/Assets/Script/UI/PanelChildController/ShopItemController.cs +++ b/Assets/Script/UI/PanelChildController/ShopItemController.cs @@ -6,9 +6,8 @@ using UnityEngine.UI; public class ShopItemController : MonoBehaviour { - ShopItem _shopItem; - public Sprite[] profileSprites; + AdManager _adManager; public void Init(ShopItem shopItem) { @@ -17,19 +16,31 @@ public class ShopItemController : MonoBehaviour var itemText = GetComponentsInChildren(); itemText[0].text = this._shopItem.Name; - itemText[1].text = this._shopItem.Price; + itemText[1].text = this._shopItem.Price+"원"; + } public void OnClickShopItem() { - if (_shopItem.Price == "광고") + if (_shopItem.Price == 0) { //보상형 전면 광고 로드 - FindObjectOfType().ShowRewardedInterstitialAd(); //Todo FindOf 함수 수정 + _adManager = GetComponent(); + _adManager.ShowRewardedInterstitialAd(); } else { - //todo 가격별로 구매하기 + NetworkManager.Instance.PurchaseCoins( + _shopItem.Price, // 충전할 코인 개수 + _shopItem.Name, // 결제 ID + "GooglePay", // 결제 방식 (GooglePay, PayPal 등) + (coins) => { + GameManager.Instance.panelManager.UpdateCoinsPanelUI(coins); + }, + () => { + Debug.LogError("결제 후 코인 충전 실패!"); + } + ); } } } diff --git a/Assets/Script/UI/PanelController/PanelManager.cs b/Assets/Script/UI/PanelController/PanelManager.cs index 7dfde0e..9c7dc3c 100644 --- a/Assets/Script/UI/PanelController/PanelManager.cs +++ b/Assets/Script/UI/PanelController/PanelManager.cs @@ -176,16 +176,15 @@ public class PanelManager : MonoBehaviour //상점 패널 생성 public void OnShopPanelClick() { - - List shopItems = new List(); //테스트 데이터 리스트 생성 - for (int i = 0; i < 10; i++) + List shopItems = new List(); //상점 데이터 리스트 생성 + for (int i = 0; i < 5; i++) { if (i == 0) //광고 항목 { ShopItem shopItem = new ShopItem { - Name = "코인10개", - Price = "광고" + Name = "광고) 코인500개 ", + Price = 0 }; shopItems.Add(shopItem); } @@ -193,16 +192,16 @@ public class PanelManager : MonoBehaviour { ShopItem shopItem = new ShopItem { - Name = "코인"+i+"개", - Price = (i * 1000)+ "원" + Name = i*1000+"개 ", + Price = i * 1000 }; shopItems.Add(shopItem); } } - - OpenShopPanel(shopItems); + GameManager.Instance.panelManager.OpenShopPanel(shopItems); } + //코인 패널 코인 갱신 public void UpdateCoinsPanelUI(int coinsChanged) { if (_coinsPanel != null) From 2b2d4c1e9f23adfc1f753e47275e2951973ba50c Mon Sep 17 00:00:00 2001 From: 99jamin <99jamin56@gmail.com> Date: Thu, 20 Mar 2025 03:12:01 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Do-37=20[Fix]=20=EC=A4=91=EB=B3=B5=20?= =?UTF-8?q?=ED=81=B4=EB=A6=AD=20=EB=B0=A9=EC=A7=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/KJM/Admob/AdManager.cs | 8 ++++---- Assets/Resources/Prefabs/Panels/Coins Panel.prefab | 1 + Assets/Script/Common/CoinsPanelController.cs | 13 ++++++++++--- .../UI/PanelChildController/ShopItemController.cs | 7 +++++-- Assets/Script/UI/PanelController/PanelManager.cs | 4 ++-- Assets/Trash Can_JY/CoinUITestScript.cs | 8 ++++---- 6 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Assets/KJM/Admob/AdManager.cs b/Assets/KJM/Admob/AdManager.cs index 71def8d..0a1d754 100644 --- a/Assets/KJM/Admob/AdManager.cs +++ b/Assets/KJM/Admob/AdManager.cs @@ -38,14 +38,14 @@ public class AdManager : MonoBehaviour } // 보상형 전면 광고 실행 - public void ShowRewardedInterstitialAd() + public void ShowRewardedInterstitialAd(CanvasGroup shopPanel) { if (rewardedInterstitialAd != null && rewardedInterstitialAd.CanShowAd()) { rewardedInterstitialAd.Show((Reward reward) => //서버에서 500코인을 고정으로 반환하기 때문에 reward는 사용하지 않음. { // 코인 지급 로직 - GrantReward(); + GrantReward(shopPanel); }); } else @@ -62,12 +62,12 @@ public class AdManager : MonoBehaviour } // 코인 지급 함수 - private void GrantReward() + private void GrantReward(CanvasGroup shopPanel) { NetworkManager.Instance.WatchAdForCoins((coinsAdded) => { // UI 업데이트 - GameManager.Instance.panelManager.UpdateCoinsPanelUI(coinsAdded); + GameManager.Instance.panelManager.UpdateCoinsPanelUI(coinsAdded, shopPanel); }, () => { Debug.Log("광고 시청 후 코인 추가 실패!"); diff --git a/Assets/Resources/Prefabs/Panels/Coins Panel.prefab b/Assets/Resources/Prefabs/Panels/Coins Panel.prefab index 2e3204c..93b08f8 100644 --- a/Assets/Resources/Prefabs/Panels/Coins Panel.prefab +++ b/Assets/Resources/Prefabs/Panels/Coins Panel.prefab @@ -56,6 +56,7 @@ MonoBehaviour: coinsRemoveAudioClip: {fileID: 8300000, guid: 585a9de0fb7ee4163af5c559ba5b2364, type: 3} coinsAddAudioClip: {fileID: 8300000, guid: 1ec44182fa76a4b3eb1459c0a6d9a8ab, type: 3} coinsEmptyAudioClip: {fileID: 8300000, guid: 908a78cb991984977bea42916bed8684, type: 3} + ShopPanel: {fileID: 8190964574954487140, guid: eb257b0a685b2254f860f294ce8cba54, type: 3} --- !u!82 &5499754916380040505 AudioSource: m_ObjectHideFlags: 0 diff --git a/Assets/Script/Common/CoinsPanelController.cs b/Assets/Script/Common/CoinsPanelController.cs index ebd013c..34b924c 100644 --- a/Assets/Script/Common/CoinsPanelController.cs +++ b/Assets/Script/Common/CoinsPanelController.cs @@ -2,6 +2,7 @@ using System; using UnityEngine; using DG.Tweening; using TMPro; +using UnityEngine.EventSystems; using UnityEngine.Serialization; using UnityEngine.UI; @@ -14,7 +15,7 @@ public class CoinsPanelController : MonoBehaviour [SerializeField] private AudioClip coinsRemoveAudioClip; [SerializeField] private AudioClip coinsAddAudioClip; [SerializeField] private AudioClip coinsEmptyAudioClip; - + private Color _coinsColor; private AudioSource _audioSource; private int _coinsCount; @@ -93,11 +94,13 @@ public class CoinsPanelController : MonoBehaviour /// 코인 추가 함수 /// /// 추가할 코인 수량 + /// /// 애니메이션 종료 후 동작 EX) 코인 수량 변경 - public void AddCoins(int coinsCount, Action action) + public void AddCoins(int coinsCount, CanvasGroup shopPanel,Action action) { + shopPanel.blocksRaycasts = false; //코인 중복 추가 방지 코드 + Sequence sequence = DOTween.Sequence(); - // i += a 반복 횟수 조절, 100개 단위로 상승 차감 시 100으로 설정 for (int i = 0; i < coinsCount; i+=500) { @@ -115,6 +118,10 @@ public class CoinsPanelController : MonoBehaviour }); sequence.AppendInterval(0.5f); } + sequence.OnComplete(() => + { + shopPanel.blocksRaycasts = true; //구매 후 클릭 활성화 + }); } public void EmptyCoins() diff --git a/Assets/Script/UI/PanelChildController/ShopItemController.cs b/Assets/Script/UI/PanelChildController/ShopItemController.cs index 87e4403..97f9ad5 100644 --- a/Assets/Script/UI/PanelChildController/ShopItemController.cs +++ b/Assets/Script/UI/PanelChildController/ShopItemController.cs @@ -22,20 +22,23 @@ public class ShopItemController : MonoBehaviour public void OnClickShopItem() { + var shopPanel = GetComponentInParent(); //코인 구매시 상점 패널의 캔버스 그룹 raycast를 비활성화하여 중복클릭 방지. + if (_shopItem.Price == 0) { //보상형 전면 광고 로드 _adManager = GetComponent(); - _adManager.ShowRewardedInterstitialAd(); + _adManager.ShowRewardedInterstitialAd(shopPanel); } else { + NetworkManager.Instance.PurchaseCoins( _shopItem.Price, // 충전할 코인 개수 _shopItem.Name, // 결제 ID "GooglePay", // 결제 방식 (GooglePay, PayPal 등) (coins) => { - GameManager.Instance.panelManager.UpdateCoinsPanelUI(coins); + GameManager.Instance.panelManager.UpdateCoinsPanelUI(coins,shopPanel); }, () => { Debug.LogError("결제 후 코인 충전 실패!"); diff --git a/Assets/Script/UI/PanelController/PanelManager.cs b/Assets/Script/UI/PanelController/PanelManager.cs index 9c7dc3c..8cb4b74 100644 --- a/Assets/Script/UI/PanelController/PanelManager.cs +++ b/Assets/Script/UI/PanelController/PanelManager.cs @@ -202,11 +202,11 @@ public class PanelManager : MonoBehaviour } //코인 패널 코인 갱신 - public void UpdateCoinsPanelUI(int coinsChanged) + public void UpdateCoinsPanelUI(int coinsChanged, CanvasGroup shopPanel) { if (_coinsPanel != null) { - _coinsPanel.AddCoins(coinsChanged, () => + _coinsPanel.AddCoins(coinsChanged, shopPanel, () => { }); diff --git a/Assets/Trash Can_JY/CoinUITestScript.cs b/Assets/Trash Can_JY/CoinUITestScript.cs index 14c72ba..c5dc7b4 100644 --- a/Assets/Trash Can_JY/CoinUITestScript.cs +++ b/Assets/Trash Can_JY/CoinUITestScript.cs @@ -8,10 +8,10 @@ public class CoinUITestScript : MonoBehaviour public void OnClickAddCoin() { - coinsPanelController.AddCoins(100, () => - { - Debug.Log("Add coin 후 동작"); - }); + // coinsPanelController.AddCoins(100, () => + // { + // Debug.Log("Add coin 후 동작"); + // }); } public void OnClickRemoveCoin() From 4099ceabcb32a631a2166c7def51806e78dc4670 Mon Sep 17 00:00:00 2001 From: 99jamin <99jamin56@gmail.com> Date: Thu, 20 Mar 2025 10:38:05 +0900 Subject: [PATCH 3/5] =?UTF-8?q?DO-37=20[Fix]=20=EA=B8=B0=EC=A1=B4=20?= =?UTF-8?q?=EA=B4=91=EA=B3=A0=20=EA=B0=9D=EC=B2=B4=20=ED=95=B4=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/KJM/Admob/AdManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/KJM/Admob/AdManager.cs b/Assets/KJM/Admob/AdManager.cs index 0a1d754..d059ac5 100644 --- a/Assets/KJM/Admob/AdManager.cs +++ b/Assets/KJM/Admob/AdManager.cs @@ -19,6 +19,12 @@ public class AdManager : MonoBehaviour // 보상형 전면 광고 로드 public void LoadRewardedInterstitialAd() { + if (rewardedInterstitialAd != null) + { + rewardedInterstitialAd.Destroy(); // 기존 광고 객체 해제 + rewardedInterstitialAd = null; + } + AdRequest request = new AdRequest(); RewardedInterstitialAd.Load(adUnitId, request, From d71cb2bb878dcd9a88ff4b02da744d12ca3d50bd Mon Sep 17 00:00:00 2001 From: 99jamin <99jamin56@gmail.com> Date: Thu, 20 Mar 2025 11:11:43 +0900 Subject: [PATCH 4/5] =?UTF-8?q?Do-37=20[Style]=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/KJM/Admob/AdManager.cs | 3 +-- Assets/KJM/ShopTest/MainPanelButtonController.cs | 8 ++++---- Assets/Script/Common/CoinsPanelController.cs | 2 +- Assets/Script/Common/ScrollItem/ShopItem.cs | 4 ++-- Assets/Script/Main/NetworkManager.cs | 2 +- .../UI/PanelChildController/ShopItemController.cs | 12 ++++++------ Assets/Script/UI/PanelController/PanelManager.cs | 8 ++++---- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Assets/KJM/Admob/AdManager.cs b/Assets/KJM/Admob/AdManager.cs index d059ac5..1950296 100644 --- a/Assets/KJM/Admob/AdManager.cs +++ b/Assets/KJM/Admob/AdManager.cs @@ -63,7 +63,6 @@ public class AdManager : MonoBehaviour // 광고 닫힘 이벤트 처리 private void HandleAdClosed() { - Debug.Log("보상형 전면 광고 닫힘, 새로운 광고 로드."); LoadRewardedInterstitialAd(); // 광고가 닫힌 후 다시 로드 } @@ -76,7 +75,7 @@ public class AdManager : MonoBehaviour GameManager.Instance.panelManager.UpdateCoinsPanelUI(coinsAdded, shopPanel); }, () => { - Debug.Log("광고 시청 후 코인 추가 실패!"); + Debug.Log("광고 시청 후 코인 추가 실패"); }); } } \ No newline at end of file diff --git a/Assets/KJM/ShopTest/MainPanelButtonController.cs b/Assets/KJM/ShopTest/MainPanelButtonController.cs index 0f3e996..fb512e9 100644 --- a/Assets/KJM/ShopTest/MainPanelButtonController.cs +++ b/Assets/KJM/ShopTest/MainPanelButtonController.cs @@ -16,8 +16,8 @@ public class MainPanelButtonController : MonoBehaviour { ShopItem shopItem = new ShopItem { - Name = "광고) 코인500개 ", - Price = 0 + name = "광고) 코인500개 ", + price = 0 }; shopItems.Add(shopItem); } @@ -25,8 +25,8 @@ public class MainPanelButtonController : MonoBehaviour { ShopItem shopItem = new ShopItem { - Name = i*1000+"개 ", - Price = i * 1000 + name = i*1000+"개 ", + price = i * 1000 }; shopItems.Add(shopItem); } diff --git a/Assets/Script/Common/CoinsPanelController.cs b/Assets/Script/Common/CoinsPanelController.cs index 34b924c..38c3dcd 100644 --- a/Assets/Script/Common/CoinsPanelController.cs +++ b/Assets/Script/Common/CoinsPanelController.cs @@ -94,7 +94,7 @@ public class CoinsPanelController : MonoBehaviour /// 코인 추가 함수 /// /// 추가할 코인 수량 - /// + /// 상점 패널 캔버스 그룹 /// 애니메이션 종료 후 동작 EX) 코인 수량 변경 public void AddCoins(int coinsCount, CanvasGroup shopPanel,Action action) { diff --git a/Assets/Script/Common/ScrollItem/ShopItem.cs b/Assets/Script/Common/ScrollItem/ShopItem.cs index 0959f2a..e1554ff 100644 --- a/Assets/Script/Common/ScrollItem/ShopItem.cs +++ b/Assets/Script/Common/ScrollItem/ShopItem.cs @@ -4,6 +4,6 @@ using UnityEngine; public class ShopItem { - public string Name; - public int Price; + public string name; + public int price; } diff --git a/Assets/Script/Main/NetworkManager.cs b/Assets/Script/Main/NetworkManager.cs index 03e71e8..0d69e7b 100644 --- a/Assets/Script/Main/NetworkManager.cs +++ b/Assets/Script/Main/NetworkManager.cs @@ -429,7 +429,7 @@ public class NetworkManager : Singleton if (purchaseResult.result == "SUCCESS") { - Debug.Log($"결제 완료! {purchaseResult.purchased} 코인 충전됨, 현재 코인: {purchaseResult.currentCoins}"); + Debug.Log($"결제 완료 {purchaseResult.purchased} 코인 충전됨, 현재 코인: {purchaseResult.currentCoins}"); // 유저 데이터 갱신 UserManager.Instance.SetCoinsInfo(); diff --git a/Assets/Script/UI/PanelChildController/ShopItemController.cs b/Assets/Script/UI/PanelChildController/ShopItemController.cs index 97f9ad5..7b39614 100644 --- a/Assets/Script/UI/PanelChildController/ShopItemController.cs +++ b/Assets/Script/UI/PanelChildController/ShopItemController.cs @@ -15,8 +15,8 @@ public class ShopItemController : MonoBehaviour var itemImage = GetComponentsInChildren()[1]; var itemText = GetComponentsInChildren(); - itemText[0].text = this._shopItem.Name; - itemText[1].text = this._shopItem.Price+"원"; + itemText[0].text = this._shopItem.name; + itemText[1].text = this._shopItem.price+"원"; } @@ -24,7 +24,7 @@ public class ShopItemController : MonoBehaviour { var shopPanel = GetComponentInParent(); //코인 구매시 상점 패널의 캔버스 그룹 raycast를 비활성화하여 중복클릭 방지. - if (_shopItem.Price == 0) + if (_shopItem.price == 0) { //보상형 전면 광고 로드 _adManager = GetComponent(); @@ -34,14 +34,14 @@ public class ShopItemController : MonoBehaviour { NetworkManager.Instance.PurchaseCoins( - _shopItem.Price, // 충전할 코인 개수 - _shopItem.Name, // 결제 ID + _shopItem.price, // 충전할 코인 개수 + _shopItem.name, // 결제 ID "GooglePay", // 결제 방식 (GooglePay, PayPal 등) (coins) => { GameManager.Instance.panelManager.UpdateCoinsPanelUI(coins,shopPanel); }, () => { - Debug.LogError("결제 후 코인 충전 실패!"); + Debug.LogError("결제 후 코인 충전 실패"); } ); } diff --git a/Assets/Script/UI/PanelController/PanelManager.cs b/Assets/Script/UI/PanelController/PanelManager.cs index 8cb4b74..c44c585 100644 --- a/Assets/Script/UI/PanelController/PanelManager.cs +++ b/Assets/Script/UI/PanelController/PanelManager.cs @@ -183,8 +183,8 @@ public class PanelManager : MonoBehaviour { ShopItem shopItem = new ShopItem { - Name = "광고) 코인500개 ", - Price = 0 + name = "광고) 코인500개 ", + price = 0 }; shopItems.Add(shopItem); } @@ -192,8 +192,8 @@ public class PanelManager : MonoBehaviour { ShopItem shopItem = new ShopItem { - Name = i*1000+"개 ", - Price = i * 1000 + name = i*1000+"개 ", + price = i * 1000 }; shopItems.Add(shopItem); } From a2a85cb7074c948cf6a18f5c985ec91a09bc5fe3 Mon Sep 17 00:00:00 2001 From: 99jamin <99jamin56@gmail.com> Date: Thu, 20 Mar 2025 11:17:05 +0900 Subject: [PATCH 5/5] =?UTF-8?q?Do-37=20[Fix]=20=EC=B6=A9=EB=8F=8C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 메인 패널 프리팹 nickname text 변경 --- Assets/Resources/Prefabs/Panels/Main Panel.prefab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Resources/Prefabs/Panels/Main Panel.prefab b/Assets/Resources/Prefabs/Panels/Main Panel.prefab index 23e575a..00d5e72 100644 --- a/Assets/Resources/Prefabs/Panels/Main Panel.prefab +++ b/Assets/Resources/Prefabs/Panels/Main Panel.prefab @@ -1714,7 +1714,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: kjm + m_text: test1 m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}