From 92f9dd2bf7e9aa135ffdbd793859bcdd907bb4cf Mon Sep 17 00:00:00 2001 From: Mingu Kim Date: Thu, 3 Jul 2025 21:11:38 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A3=B0=EB=A0=9B=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Gameton/Scripts/UI/RouletteSpin/Roulette.cs | 17 +---------------- .../UI/RouletteSpin/RoulettePresenter.cs | 3 +-- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/Roulette.cs b/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/Roulette.cs index af769742..3696b3ec 100644 --- a/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/Roulette.cs +++ b/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/Roulette.cs @@ -73,21 +73,6 @@ namespace TON Debug.Log($"({roulettePieceData[i].index}) {roulettePieceData[i].description}:{roulettePieceData[i].weight}"); } } - - private int GetRandomIndex() - { - int weight = Random.Range(0, accumulatedWeight); - - for (int i = 0; i < roulettePieceData.Length; ++i) - { - if (roulettePieceData[i].weight > weight) - { - return i; - } - } - - return 0; - } public void Bind(RoulettePresenter presenter) { @@ -118,7 +103,7 @@ namespace TON }); } - private System.Collections.IEnumerator OnSpin(float end, System.Action onEnd) + private IEnumerator OnSpin(float end, System.Action onEnd) { float current = 0; float percent = 0; diff --git a/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/RoulettePresenter.cs b/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/RoulettePresenter.cs index 3ee4772b..5ac6c1de 100644 --- a/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/RoulettePresenter.cs +++ b/Gameton-06/Assets/Gameton/Scripts/UI/RouletteSpin/RoulettePresenter.cs @@ -57,8 +57,7 @@ namespace TON SelectedPiece.Value = selected; onResult?.Invoke(selected); } - - // 결과 처리(예: 골드 지급 등) + public void InsertRouletteResult(RoulettePiecePresenter selectedPresenter) { if (playerDataManager != null && int.TryParse(selectedPresenter.Description.Value, out int gold))