[Add] Unitask
This commit is contained in:
@@ -52,7 +52,7 @@ namespace YachtDice.Dice
|
||||
/// </summary>
|
||||
public bool IsRolling { get; private set; }
|
||||
|
||||
private Coroutine rollRoutine;
|
||||
private Coroutine _rollRoutine;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
@@ -68,10 +68,10 @@ namespace YachtDice.Dice
|
||||
{
|
||||
if (IsRolling) return;
|
||||
|
||||
if (rollRoutine != null)
|
||||
StopCoroutine(rollRoutine);
|
||||
if (_rollRoutine != null)
|
||||
StopCoroutine(_rollRoutine);
|
||||
|
||||
rollRoutine = StartCoroutine(RollSequence());
|
||||
_rollRoutine = StartCoroutine(RollSequence());
|
||||
}
|
||||
|
||||
private IEnumerator RollSequence()
|
||||
|
||||
@@ -35,15 +35,15 @@ namespace YachtDice.UI
|
||||
"Шанс"
|
||||
};
|
||||
|
||||
private YachtCategory[] allCategories;
|
||||
private YachtCategory[] _allCategories;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
allCategories = (YachtCategory[])Enum.GetValues(typeof(YachtCategory));
|
||||
_allCategories = (YachtCategory[])Enum.GetValues(typeof(YachtCategory));
|
||||
|
||||
for (int i = 0; i < categoryRows.Count && i < allCategories.Length; i++)
|
||||
for (int i = 0; i < categoryRows.Count && i < _allCategories.Length; i++)
|
||||
{
|
||||
categoryRows[i].Initialize(allCategories[i], CategoryNames[i]);
|
||||
categoryRows[i].Initialize(_allCategories[i], CategoryNames[i]);
|
||||
categoryRows[i].OnCategorySelected += HandleCategorySelected;
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ namespace YachtDice.UI
|
||||
|
||||
public void UpdatePreviews(Dictionary<YachtCategory, int> previews)
|
||||
{
|
||||
for (int i = 0; i < categoryRows.Count && i < allCategories.Length; i++)
|
||||
for (int i = 0; i < categoryRows.Count && i < _allCategories.Length; i++)
|
||||
{
|
||||
if (previews.TryGetValue(allCategories[i], out int preview))
|
||||
if (previews.TryGetValue(_allCategories[i], out int preview))
|
||||
{
|
||||
categoryRows[i].ShowPreview(preview);
|
||||
categoryRows[i].SetInteractable(true);
|
||||
|
||||
Reference in New Issue
Block a user