[Feat] RatingPanel에서 이전 rating과 score 가져와서 반영

This commit is contained in:
HaeinLEE 2025-03-25 17:14:55 +09:00
parent e2e1a8ce63
commit e81708c22c
12 changed files with 5450 additions and 4965 deletions

View File

@ -311,6 +311,340 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6f42a47846f21b044b1cda32a9516609, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 6f42a47846f21b044b1cda32a9516609, type: 3}
--- !u!1001 &199635417
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1145381989}
m_Modifications:
- target: {fileID: 73059694667989963, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 73059694667989963, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 73059694667989963, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 73059694667989963, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 73059694667989963, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1814849262820982739, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1814849262820982739, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1814849262820982739, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1814849262820982739, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1814849262820982739, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2066535228918464495, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2066535228918464495, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2066535228918464495, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2066535228918464495, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2066535228918464495, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2398930605021866903, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2398930605021866903, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2398930605021866903, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2398930605021866903, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2398930605021866903, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3237561633508281644, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3237561633508281644, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3237561633508281644, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3237561633508281644, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3237561633508281644, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4335005352250247582, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4335005352250247582, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4335005352250247582, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4335005352250247582, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4496444721386529658, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4496444721386529658, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4496444721386529658, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4496444721386529658, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.y
value: 170
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4884033288069177921, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4884033288069177921, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4884033288069177921, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4884033288069177921, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4884033288069177921, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5200480579670380035, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5200480579670380035, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5200480579670380035, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5200480579670380035, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5736632569759586022, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5736632569759586022, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5736632569759586022, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5736632569759586022, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5736632569759586022, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6213517361565184491, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6213517361565184491, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6213517361565184491, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6213517361565184491, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6213517361565184491, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6828314909902487279, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6828314909902487279, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6828314909902487279, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6828314909902487279, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6828314909902487279, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7763597564147330313, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_Name
value: Three Rating Points
objectReference: {fileID: 0}
- target: {fileID: 7763597564147330313, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
--- !u!224 &199635418 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 4875065499529020364, guid: d5eb710437fc81b4290c5aec72f35737, type: 3}
m_PrefabInstance: {fileID: 199635417}
m_PrefabAsset: {fileID: 0}
--- !u!1 &519420028 --- !u!1 &519420028
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1952,7 +2286,10 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: 6614054331963984893, guid: f87bd040c947d8b4dbc513c71a5656dd, type: 3}
insertIndex: -1
addedObject: {fileID: 199635418}
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f87bd040c947d8b4dbc513c71a5656dd, type: 3} m_SourcePrefab: {fileID: 100100000, guid: f87bd040c947d8b4dbc513c71a5656dd, type: 3}
--- !u!224 &972014384 stripped --- !u!224 &972014384 stripped
@ -2004,6 +2341,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: da4e7b6c90ef1dd49a95d0f1716dedc7, type: 3} m_Script: {fileID: 11500000, guid: da4e7b6c90ef1dd49a95d0f1716dedc7, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
--- !u!224 &1145381989 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 6614054331963984893, guid: f87bd040c947d8b4dbc513c71a5656dd, type: 3}
m_PrefabInstance: {fileID: 805204080}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1231053598 --- !u!1 &1231053598
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3e75bd6cadb9a344db2fcc13ad4def10
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7afb240e18338e54195a99e1e0a032e0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: bd3d2c55850be9f4394c7054b040a8f0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d5eb710437fc81b4290c5aec72f35737
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1104,7 +1104,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: "18\uAE09" m_text: "5\uAE09"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}
@ -1713,7 +1713,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_text: "\uD638\uB7AD\uC774" m_text: "\uD14C\uC2A4\uD2B8\uC0BC\uBC88"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_fontAsset: {fileID: 11400000, guid: 85a19688db53c77469fc4406b01045da, type: 2}
m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2} m_sharedMaterial: {fileID: -2477908578676791210, guid: 85a19688db53c77469fc4406b01045da, type: 2}

File diff suppressed because it is too large Load Diff

View File

@ -5,11 +5,32 @@ using UnityEngine.UI;
public class RatingPointsController : MonoBehaviour public class RatingPointsController : MonoBehaviour
{ {
[SerializeField] Image[] minusImages; [SerializeField] GameObject[] minusImages;
[SerializeField] Image[] plusImage; [SerializeField] GameObject[] plusImage;
[SerializeField] private float flipDuration = 0.3f;
private Color32 _minusColor = new Color32(255, 0, 0, 255); private Color32 _minusColor = new Color32(255, 0, 0, 255);
private Color32 _plusColor = new Color32(34, 87, 255, 255); private Color32 _plusColor = new Color32(34, 87, 255, 255);
private Color32 _defaultColor = new Color32(176, 176, 176, 255); private Color32 _defaultColor = new Color32(176, 176, 176, 255);
public void InitRatingPoints(int oldScore)
{
if (oldScore == 0)
{
return;
}else if (oldScore > 0)
{
for (int i = 0; i < oldScore; i++)
{
plusImage[i].GetComponent<Image>().color = _plusColor;
}
}
else if (oldScore < 0)
{
for (int i = oldScore; i < 0; i++)
{
minusImages[minusImages.Length+i].GetComponent<Image>().color = _minusColor;
}
}
}
} }

View File

@ -9,14 +9,17 @@ public class RatingPanelController : ConfirmPanelController
{ {
[SerializeField] private TMP_Text getPointsText; [SerializeField] private TMP_Text getPointsText;
[SerializeField] private TMP_Text scoreText; [SerializeField] private TMP_Text scoreText;
[SerializeField] private GameObject threePointsIndicator; [SerializeField] private GameObject threePointsIndicatorGameObject;
[SerializeField] private GameObject fivePointsIndicator; [SerializeField] private GameObject fivePointsIndicatorGameObject;
[SerializeField] private GameObject tenPointsIndicator; [SerializeField] private GameObject tenPointsIndicatorGameObject;
[SerializeField] private Transform pointsIndicatorParent;
private bool _isWin; private bool _isWin;
private int _requiredPoints; private int _requiredScore;
private int _currentPoints; private int _oldScore;
private int _newScore;
private int _myRating; private int _myRating;
private RatingPointsController _ratingPointsController;
/// <summary> /// <summary>
/// 텍스트 초기화, 승급포인트 계산 /// 텍스트 초기화, 승급포인트 계산
@ -26,13 +29,25 @@ public class RatingPanelController : ConfirmPanelController
{ {
_isWin = isWin; _isWin = isWin;
_myRating= UserManager.Instance.Rating; _myRating= UserManager.Instance.Rating;
if (_myRating >= 10 && _myRating <= 18) {// 10~18급은 3점 필요 if (_myRating >= 10 && _myRating <= 18) // 10~18급은 3점 필요
threePointsIndicator.gameObject.SetActive(true); {
} else if (_myRating >= 5 && _myRating <= 9) {// 5~9급은 5점 필요 var threePointsIndicator = Instantiate(threePointsIndicatorGameObject, pointsIndicatorParent);
fivePointsIndicator.gameObject.SetActive(true); _requiredScore = 3;
} else if (_myRating >= 1 && _myRating <= 4) {// 1~4급은 10점 필요
tenPointsIndicator.gameObject.SetActive(true); _ratingPointsController = threePointsIndicator.GetComponent<RatingPointsController>();
tenPointsIndicator.GetComponent<RatingPointsController>(); }
else if (_myRating >= 5 && _myRating <= 9) // 5~9급은 5점 필요
{
var fivePointsIndicator = Instantiate(fivePointsIndicatorGameObject, pointsIndicatorParent);
_requiredScore = 5;
_ratingPointsController = fivePointsIndicator.GetComponent<RatingPointsController>();
}
else if (_myRating >= 1 && _myRating <= 4) // 1~4급은 10점 필요
{
var tenPointsIndicator = Instantiate(tenPointsIndicatorGameObject, pointsIndicatorParent);
_requiredScore = 10;
_ratingPointsController = tenPointsIndicator.GetComponent<RatingPointsController>();
} }
string win = _isWin ? "승리" : "패배"; string win = _isWin ? "승리" : "패배";
@ -40,7 +55,15 @@ public class RatingPanelController : ConfirmPanelController
getPointsText.text = $"게임에서 {win}했습니다.\n{Constants.RAING_POINTS} 승급 포인트를 {get}"; getPointsText.text = $"게임에서 {win}했습니다.\n{Constants.RAING_POINTS} 승급 포인트를 {get}";
//TODO: network에 스코어 요청 //network에 oldScore 요청.
//이 부분은 승,패 패널에서 처리 후 rating,store만 oldData를 가져와서 승급에 전달해주고
//
NetworkManager.Instance.GetInfo((userInfo) =>
{
_oldScore = userInfo.score;
_ratingPointsController.InitRatingPoints(_oldScore);
}, () =>
{ });
} }
void Start() void Start()