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)