룰렛 사용하지 않는 코드 제거
This commit is contained in:
@@ -73,21 +73,6 @@ namespace TON
|
|||||||
Debug.Log($"({roulettePieceData[i].index}) {roulettePieceData[i].description}:{roulettePieceData[i].weight}");
|
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)
|
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 current = 0;
|
||||||
float percent = 0;
|
float percent = 0;
|
||||||
|
|||||||
@@ -57,8 +57,7 @@ namespace TON
|
|||||||
SelectedPiece.Value = selected;
|
SelectedPiece.Value = selected;
|
||||||
onResult?.Invoke(selected);
|
onResult?.Invoke(selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 결과 처리(예: 골드 지급 등)
|
|
||||||
public void InsertRouletteResult(RoulettePiecePresenter selectedPresenter)
|
public void InsertRouletteResult(RoulettePiecePresenter selectedPresenter)
|
||||||
{
|
{
|
||||||
if (playerDataManager != null && int.TryParse(selectedPresenter.Description.Value, out int gold))
|
if (playerDataManager != null && int.TryParse(selectedPresenter.Description.Value, out int gold))
|
||||||
|
|||||||
Reference in New Issue
Block a user