From aa943476dbf6cc02de870fbfc84ce4f993a77cf7 Mon Sep 17 00:00:00 2001 From: HaeinLEE Date: Fri, 28 Mar 2025 17:15:09 +0900 Subject: [PATCH] =?UTF-8?q?[Style]=20=EC=8A=B9=EA=B8=89,=EA=B0=95=EB=93=B1?= =?UTF-8?q?=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=ED=9A=A8=EA=B3=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 휘릭 돌면서 초기화됩니다. --- .../RatingPointsController.cs | 39 ++++++++++++++++--- .../PanelController/RatingPanelController.cs | 9 ++++- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/Assets/Script/UI/PanelChildController/RatingPointsController.cs b/Assets/Script/UI/PanelChildController/RatingPointsController.cs index 84967b8..24483f8 100644 --- a/Assets/Script/UI/PanelChildController/RatingPointsController.cs +++ b/Assets/Script/UI/PanelChildController/RatingPointsController.cs @@ -121,10 +121,13 @@ public class RatingPointsController : MonoBehaviour private void SetScoreCountText() { // 남은 승리수가 0인 경우 승급점수 도달 혹은 강등점수 도달 - if (_newRequiredScore == 0 || _newRequiredScore == _oldRequiredScore * 2) + if (_newRequiredScore == 0) { - //새로운 급수에 맞춰서 패널 초기화하기 - scoreCountText.text = ""; + scoreCountText.text = "승급 포인트에 달성했습니다 !"; + } + else if (_newRequiredScore == _oldRequiredScore * 2) + { + scoreCountText.text = "점수가 낮아 강등됩니다.."; } else if (_newRequiredScore < 0) { @@ -145,8 +148,8 @@ public class RatingPointsController : MonoBehaviour for (int i = 0; i < 10; i++) { plusImage[i].GetComponent().color = _plusColor; - scoreCountText.text = $"더 이상 승급 할 수 없습니다.\n누적 {winCount} 승 하셨습니다."; } + scoreCountText.text = $"더 이상 승급 할 수 없습니다.\n누적 {winCount} 승 하셨습니다."; } public void SetRatingDownLimit(int loseCount) @@ -154,9 +157,35 @@ public class RatingPointsController : MonoBehaviour for (int i = 0; i < 3; i++) { minusImages[i].GetComponent().color = _minusColor; - scoreCountText.text = $"더 이상 강등 될 수 없습니다.\n누적 {loseCount*-1} 패 하셨습니다."; } + scoreCountText.text = $"더 이상 강등 될 수 없습니다.\n누적 {loseCount*-1} 패 하셨습니다."; } //승급, 강등시 패널을 초기화해서 띄워주는 함수 추가 + public void InitRatingUpPoints() + { + StartCoroutine(RatingUpPoints()); + } + + private IEnumerator RatingUpPoints() + { + foreach (var plusPoint in plusImage) + { + ChangeImageColor(plusPoint, _defaultColor); + yield return new WaitForSeconds(0.2f); + } + } + public void InitRatingDownPoints() + { + StartCoroutine(RatingDownPoints()); + } + + private IEnumerator RatingDownPoints() + { + for (int i = minusImages.Length; i >0; i--) + { + ChangeImageColor(minusImages[i-1], _defaultColor); + yield return new WaitForSeconds(0.2f); + } + } } diff --git a/Assets/Script/UI/PanelController/RatingPanelController.cs b/Assets/Script/UI/PanelController/RatingPanelController.cs index ad41db2..abd6ddf 100644 --- a/Assets/Script/UI/PanelController/RatingPanelController.cs +++ b/Assets/Script/UI/PanelController/RatingPanelController.cs @@ -58,6 +58,10 @@ public class RatingPanelController : PanelController if (scoreResultInfo.isAdvancement == 1) { GameManager.Instance.panelManager.OpenRatingEffectPanel(1); + + //패널의 포인트들 초기화 + _ratingPointsController.InitRatingUpPoints(); + //TODO: 승급이 10->9 그리고 5->4일 때 패널 바꿔주기 } },() => { }); break; @@ -69,6 +73,9 @@ public class RatingPanelController : PanelController if (scoreResultInfo.isAdvancement == -1) { GameManager.Instance.panelManager.OpenRatingEffectPanel(-1); + + _ratingPointsController.InitRatingDownPoints(); + //TODO: 강등이 4->5 그리고 9->10일 때 패널 바꿔주기 } }, () => { }); break; @@ -161,6 +168,6 @@ public class RatingPanelController : PanelController getPointsText.text = $"게임에서 {win}했습니다.\n{Constants.RAING_POINTS} 승급 포인트를 {get}"; } // 애니메이션 실행 완료를 위한 wait - yield return new WaitForSecondsRealtime(1.5f); + yield return new WaitForSecondsRealtime(1.8f); } }