diff --git a/Assets/KJM/ShopTest/MainPanelButtonController.cs b/Assets/KJM/ShopTest/MainPanelButtonController.cs index fb512e9..2b53d62 100644 --- a/Assets/KJM/ShopTest/MainPanelButtonController.cs +++ b/Assets/KJM/ShopTest/MainPanelButtonController.cs @@ -38,4 +38,9 @@ public class MainPanelButtonController : MonoBehaviour { GameManager.Instance.panelManager.OpenReplayPanel(); } + + //public void OpenRankingPanelClick() + //{ + //GameManager.Instance.panelManager.OnRankingPanelClick(); + //} } diff --git a/Assets/Resources/Prefabs/Panels/LeaderboardPanel.prefab b/Assets/Resources/Prefabs/Panels/LeaderboardPanel.prefab index 50adf35..a40445a 100644 --- a/Assets/Resources/Prefabs/Panels/LeaderboardPanel.prefab +++ b/Assets/Resources/Prefabs/Panels/LeaderboardPanel.prefab @@ -12,8 +12,6 @@ GameObject: - component: {fileID: 2911450618660204948} - component: {fileID: 2729261171078307673} - component: {fileID: 4465141290128179683} - - component: {fileID: 2835505888941074797} - - component: {fileID: 5687316735128766768} m_Layer: 5 m_Name: Viewport m_TagString: Untagged @@ -37,7 +35,7 @@ RectTransform: m_Father: {fileID: 1188344226235047902} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} + m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} @@ -92,46 +90,6 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_ShowMaskGraphic: 1 ---- !u!114 &2835505888941074797 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1858212639388121281} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} - m_Name: - m_EditorClassIdentifier: - m_HorizontalFit: 1 - m_VerticalFit: 2 ---- !u!114 &5687316735128766768 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1858212639388121281} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 0 - m_Spacing: 5 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 0 - m_ChildControlHeight: 0 - m_ChildScaleWidth: 0 - m_ChildScaleHeight: 0 - m_ReverseArrangement: 0 --- !u!1 &2602607401298266001 GameObject: m_ObjectHideFlags: 0 @@ -168,7 +126,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} m_AnchoredPosition: {x: 40, y: -40} - m_SizeDelta: {x: 36, y: 40} + m_SizeDelta: {x: 73, y: 72} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &6169341149558268219 CanvasRenderer: @@ -198,7 +156,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 427761ad91f2d9d4e85af2f6a2894218, type: 3} + m_Sprite: {fileID: 21300000, guid: 2f19224efc36c9b49978cafd03ede1bb, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -252,7 +210,7 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: - - m_Target: {fileID: 0} + - m_Target: {fileID: 1589736077307570888} m_TargetAssemblyTypeName: LeaderBoardController, Assembly-CSharp m_MethodName: OnBackButtonClicked m_Mode: 1 @@ -301,8 +259,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: 0, y: -212} - m_SizeDelta: {x: 1080, y: 1496} + m_AnchoredPosition: {x: 0, y: -112.84912} + m_SizeDelta: {x: 1080, y: 1694.3018} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &824343901473742242 CanvasRenderer: @@ -361,14 +319,14 @@ MonoBehaviour: m_Elasticity: 0.1 m_Inertia: 1 m_DecelerationRate: 0.135 - m_ScrollSensitivity: 1 + m_ScrollSensitivity: 100 m_Viewport: {fileID: 8740302936727227434} m_HorizontalScrollbar: {fileID: 0} m_VerticalScrollbar: {fileID: 3478506922544614059} m_HorizontalScrollbarVisibility: 2 m_VerticalScrollbarVisibility: 2 m_HorizontalScrollbarSpacing: -3 - m_VerticalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -15 m_OnValueChanged: m_PersistentCalls: m_Calls: [] @@ -523,6 +481,7 @@ GameObject: m_Component: - component: {fileID: 227489081374553986} - component: {fileID: 6416582684501908282} + - component: {fileID: 2816695216852066709} m_Layer: 5 m_Name: Content m_TagString: Untagged @@ -544,10 +503,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 8740302936727227434} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1060, y: 1493.8} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 0, y: 0.000034332275} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &6416582684501908282 MonoBehaviour: @@ -562,7 +521,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Padding: - m_Left: 0 + m_Left: 100 m_Right: 0 m_Top: 0 m_Bottom: 0 @@ -570,11 +529,25 @@ MonoBehaviour: m_Spacing: 50 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 1 - m_ChildControlHeight: 1 + m_ChildControlWidth: 0 + m_ChildControlHeight: 0 m_ChildScaleWidth: 0 m_ChildScaleHeight: 0 m_ReverseArrangement: 0 +--- !u!114 &2816695216852066709 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3568653418969612126} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 1 + m_VerticalFit: 2 --- !u!1 &4202334049855500581 GameObject: m_ObjectHideFlags: 0 @@ -633,7 +606,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 1, g: 0, b: 0, a: 1} + m_Color: {r: 1, g: 0.2847969, b: 0, a: 1} m_RaycastTarget: 1 m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 @@ -659,9 +632,9 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 2084150948806744478} - - component: {fileID: 7465938882283913230} - - component: {fileID: 1080045383039686757} - component: {fileID: 3478506922544614059} + - component: {fileID: 6301460630123320729} + - component: {fileID: 1849839432792571899} m_Layer: 5 m_Name: Scrollbar Vertical m_TagString: Untagged @@ -687,46 +660,8 @@ RectTransform: m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 20, y: -17} + m_SizeDelta: {x: 20, y: 0} m_Pivot: {x: 1, y: 1} ---- !u!222 &7465938882283913230 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5452094549188284008} - m_CullTransparentMesh: 1 ---- !u!114 &1080045383039686757 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 5452094549188284008} - 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: 0, b: 0, 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: 1 - 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!114 &3478506922544614059 MonoBehaviour: m_ObjectHideFlags: 0 @@ -748,10 +683,10 @@ MonoBehaviour: m_SelectOnRight: {fileID: 0} m_Transition: 1 m_Colors: - m_NormalColor: {r: 1, g: 0.55039775, b: 0, a: 1} + m_NormalColor: {r: 1, g: 0.28627452, b: 0, a: 1} m_HighlightedColor: {r: 1, g: 0, b: 0, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.93710685, g: 0.33299702, b: 0.33299702, a: 1} + m_SelectedColor: {r: 0.8409424, g: 0.9685534, b: 0.57564956, a: 1} m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} m_ColorMultiplier: 1 m_FadeDuration: 0.1 @@ -776,6 +711,44 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] +--- !u!222 &6301460630123320729 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5452094549188284008} + m_CullTransparentMesh: 1 +--- !u!114 &1849839432792571899 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5452094549188284008} + 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: 0.59607846} + 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: 1 + 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!1 &6747908716986530392 GameObject: m_ObjectHideFlags: 0 @@ -810,7 +783,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: -20, y: -20} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7787380462476439032 GameObject: @@ -882,7 +855,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -300} + m_AnchoredPosition: {x: 0, y: -115} m_SizeDelta: {x: 0, y: 50} m_Pivot: {x: 0.5, y: 1} --- !u!222 &5432856254510042803 diff --git a/Assets/Resources/Prefabs/Panels/Ranking Panel.prefab b/Assets/Resources/Prefabs/Panels/Ranking Panel.prefab index 06a872f..b9b44e1 100644 --- a/Assets/Resources/Prefabs/Panels/Ranking Panel.prefab +++ b/Assets/Resources/Prefabs/Panels/Ranking Panel.prefab @@ -545,7 +545,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: -2.9951172} + m_AnchoredPosition: {x: -392, y: -0.0053710938} m_SizeDelta: {x: 784, y: 0} m_Pivot: {x: 0, y: 1} --- !u!114 &5526954107552917871 diff --git a/Assets/Resources/Prefabs/Ranking.prefab b/Assets/Resources/Prefabs/Ranking.prefab index fc24199..3da3d9d 100644 --- a/Assets/Resources/Prefabs/Ranking.prefab +++ b/Assets/Resources/Prefabs/Ranking.prefab @@ -1166,7 +1166,7 @@ RectTransform: m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 1060, y: 170} + m_SizeDelta: {x: 900, y: 170} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &8547166501184847619 MonoBehaviour: @@ -1185,7 +1185,7 @@ MonoBehaviour: m_Right: 0 m_Top: 30 m_Bottom: 35 - m_ChildAlignment: 0 + m_ChildAlignment: 3 m_Spacing: 0 m_ChildForceExpandWidth: 1 m_ChildForceExpandHeight: 1 diff --git a/Assets/Script/Main/ScoreCellController.cs b/Assets/Script/Main/ScoreCellController.cs index cfd48c5..d6190f3 100644 --- a/Assets/Script/Main/ScoreCellController.cs +++ b/Assets/Script/Main/ScoreCellController.cs @@ -23,9 +23,9 @@ public class ScoreCellController : MonoBehaviour winText.text = item.win.ToString(); loseText.text = item.lose.ToString(); - if (profileImage != null && item.profileImageIndex != null) + if (profileImage != null && item.imageIndex != null) { - profileImage.sprite = profileSprites[item.profileImageIndex]; // 프로필 이미지 (Sprite 할당) + profileImage.sprite = profileSprites[item.imageIndex]; // 프로필 이미지 (Sprite 할당) } } } \ No newline at end of file diff --git a/Assets/Script/Main/ScoreListWrapper.cs b/Assets/Script/Main/ScoreListWrapper.cs index c8b8a1a..3afdf93 100644 --- a/Assets/Script/Main/ScoreListWrapper.cs +++ b/Assets/Script/Main/ScoreListWrapper.cs @@ -2,9 +2,10 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.Serialization; [Serializable] public class ScoreListWrapper { - public List scoreInfos; // 여러 개의 ScoreInfo를 담을 리스트 + public List leaderboardDatas; // 여러 개의 ScoreInfo를 담을 리스트 } \ No newline at end of file diff --git a/Assets/Script/Main/SigninPanelController.cs b/Assets/Script/Main/SigninPanelController.cs index ddd1216..d42bcd8 100644 --- a/Assets/Script/Main/SigninPanelController.cs +++ b/Assets/Script/Main/SigninPanelController.cs @@ -29,7 +29,7 @@ public struct ScoreInfo public int win; public int lose; public int totalGames; - public int profileImageIndex; + public int imageIndex; } [Serializable] diff --git a/Assets/Script/UI/PanelController/LeaderBoardController.cs b/Assets/Script/UI/PanelController/LeaderBoardController.cs index 5ee8ec6..808ddda 100644 --- a/Assets/Script/UI/PanelController/LeaderBoardController.cs +++ b/Assets/Script/UI/PanelController/LeaderBoardController.cs @@ -31,7 +31,7 @@ public class LeaderBoardController : MonoBehaviour private IEnumerator GetLeaderboardData() { - string url = Constants.ServerURL + "/leaderboard"; // 서버의 리더보드 데이터 URL + string url = Constants.ServerURL + "/leaderboard/"; // 서버의 리더보드 데이터 URL UnityWebRequest www = UnityWebRequest.Get(url); // GET 요청으로 데이터 받기 yield return www.SendWebRequest(); // 요청 전송 대기 @@ -48,7 +48,7 @@ public class LeaderBoardController : MonoBehaviour // JSON을 ScoreInfo 리스트로 파싱 ScoreListWrapper wrapper = JsonUtility.FromJson(jsonResponse); - List leaderboardItems = wrapper.scoreInfos; + List leaderboardItems = wrapper.leaderboardDatas; // Show 메서드를 통해 데이터를 표시 Show(leaderboardItems); @@ -106,7 +106,7 @@ public class LeaderBoardController : MonoBehaviour if (!string.IsNullOrEmpty(savedData)) { // 저장된 JSON 데이터를 파싱하여 리더보드 리스트로 변환 - leaderboard = JsonUtility.FromJson(savedData).scoreInfos; + leaderboard = JsonUtility.FromJson(savedData).leaderboardDatas; } return leaderboard;