feat: 랭킹 노출 조건 수정

This commit is contained in:
aube.lee
2025-03-04 22:33:46 +09:00
parent 20219615b9
commit 58b98ce463
7 changed files with 58 additions and 43 deletions

View File

@@ -1504,11 +1504,11 @@ RectTransform:
- {fileID: 8160306688446430222} - {fileID: 8160306688446430222}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 1, y: 0.5} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 250} m_SizeDelta: {x: 840, y: 250}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 1}
--- !u!222 &2461189433906269157 --- !u!222 &2461189433906269157
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@@ -227,7 +227,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &4887657808625157883 --- !u!224 &4887657808625157883
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@@ -330,7 +330,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 2996482217434952235} m_HandleRect: {fileID: 2996482217434952235}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 0
m_Size: 0.9999915 m_Size: 1
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
@@ -861,13 +861,13 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1235168763264746713} - {fileID: 7495923051705061397}
m_Father: {fileID: 6130240796382213815} m_Father: {fileID: 6130240796382213815}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: 0.00002390486} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 300} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!1 &3043442581440476734 --- !u!1 &3043442581440476734
GameObject: GameObject:
@@ -2460,10 +2460,10 @@ RectTransform:
- {fileID: 6417327352021012356} - {fileID: 6417327352021012356}
m_Father: {fileID: 3893907938536155103} m_Father: {fileID: 3893907938536155103}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: -100, y: -100} m_SizeDelta: {x: 840, y: 800}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1777609069712655264 --- !u!222 &1777609069712655264
CanvasRenderer: CanvasRenderer:
@@ -2982,7 +2982,7 @@ RectTransform:
m_Father: {fileID: 7949169664028140168} m_Father: {fileID: 7949169664028140168}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20} m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
@@ -3024,7 +3024,7 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1001 &1395767179664397934 --- !u!1001 &7673060521725952674
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
@@ -3038,27 +3038,27 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_Pivot.y propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchorMax.x
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.x
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchorMin.x propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchorMin.y
value: 0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchorMin.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 0 value: 840
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
@@ -3122,7 +3122,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3398201985880822359, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 3398201985880822359, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 465.33334 value: 463.33334
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 3398201985880822359, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 3398201985880822359, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
@@ -3162,7 +3162,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9137538600224533238, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 9137538600224533238, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 262.6667 value: 261.6667
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9137538600224533238, guid: 64f6711fc3dfade4f8926564be683890, type: 3} - target: {fileID: 9137538600224533238, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
@@ -3173,8 +3173,8 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 64f6711fc3dfade4f8926564be683890, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
--- !u!224 &1235168763264746713 stripped --- !u!224 &7495923051705061397 stripped
RectTransform: RectTransform:
m_CorrespondingSourceObject: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3} m_CorrespondingSourceObject: {fileID: 178720843269296823, guid: 64f6711fc3dfade4f8926564be683890, type: 3}
m_PrefabInstance: {fileID: 1395767179664397934} m_PrefabInstance: {fileID: 7673060521725952674}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}

View File

@@ -194,17 +194,14 @@ namespace TON
// 결과 제한 수 (100개) // 결과 제한 수 (100개)
int limit = 100; int limit = 100;
// 첫 번째 정렬 기준 (wave 내림차순)
string firstKey = "wave";
// 데이터 비동기 요청 // 데이터 비동기 요청
Backend.GameData.Get(RANK_TABLE, new Where(), select, limit, firstKey, TableSortOrder.DESC, bro => Backend.GameData.Get(RANK_TABLE, new Where(), select, limit, null, TableSortOrder.DESC, bro =>
{ {
// 요청 성공 확인 // 요청 성공 확인
if (bro.IsSuccess()) if (bro.IsSuccess())
{ {
// 데이터 처리 // 데이터 처리
LitJson.JsonData rankData = bro.GetReturnValuetoJSON()["rows"]; LitJson.JsonData rankData = bro.Rows();
Debug.Log("가져온 데이터 수: " + rankData.Count); Debug.Log("가져온 데이터 수: " + rankData.Count);
onComplete?.Invoke(rankData); onComplete?.Invoke(rankData);

View File

@@ -24,6 +24,14 @@ namespace TON
score = 0; score = 0;
} }
public ClearData(string nickname, int wave, float playTime, int score)
{
this.nickname = nickname;
this.wave = wave;
this.playTime = playTime;
this.score = score;
}
public void UpdateClearData(string nickname, int wave, float playTime, int score) public void UpdateClearData(string nickname, int wave, float playTime, int score)
{ {
this.nickname = nickname; this.nickname = nickname;

View File

@@ -97,13 +97,14 @@ namespace TON
{ {
LitJson.JsonData row = rankData[i]; LitJson.JsonData row = rankData[i];
RankList.Add(new ClearData RankList.Add(new ClearData
{ (
nickname = row["nickname"].ToString(), row["nickname"]["S"].ToString(),
wave = int.Parse(row["wave"].ToString()), int.Parse(row["wave"]["N"].ToString()),
score = int.Parse(row["score"].ToString()), float.Parse(row["play_time"]["N"].ToString()),
playTime = float.Parse(row["play_time"].ToString()), int.Parse(row["score"]["N"].ToString())
}); ));
} }
;
// 정렬 (score 내림차순, playTime 오름차순) // 정렬 (score 내림차순, playTime 오름차순)
RankList.Sort((a, b) => RankList.Sort((a, b) =>
@@ -114,6 +115,11 @@ namespace TON
}); });
} }
public List<ClearData> GetRankDataList()
{
return RankList;
}
// 내 랭킹 순위 반환 // 내 랭킹 순위 반환
public int GetMyRankNumber() public int GetMyRankNumber()
{ {

View File

@@ -64,7 +64,7 @@ namespace TON
uiPrefabList.Clear(); uiPrefabList.Clear();
} }
List<ClearData> rankList = StageManager.Singleton.RankList; List<ClearData> rankList = StageManager.Singleton.GetRankDataList();
if (rankList.Count == 0) if (rankList.Count == 0)
{ {

View File

@@ -31,8 +31,12 @@ namespace TON
playTimeText.text = $"{minutes:0}m {seconds:0}s"; playTimeText.text = $"{minutes:0}m {seconds:0}s";
SetPawIcon(rank); SetPawIcon(rank);
if (clearData.nickname == PlayerDataManager.Singleton.player.name)
{
SetMyRankBoxImage(); SetMyRankBoxImage();
} }
}
private void SetMyRankBoxImage() private void SetMyRankBoxImage()
{ {