This commit is contained in:
2025-12-18 03:49:05 +08:00
parent 668bd03f63
commit 667a39c260
8 changed files with 6 additions and 18 deletions

View File

@@ -1,6 +1,5 @@
using Enums;
using Models.Interfaces;
using Services;
using Structs;
using UnityEngine;

View File

@@ -1,11 +1,10 @@
using System;
using System.Linq;
using Enums;
using Random = UnityEngine.Random;
namespace Utils {
public static class RandomUtils {
private static readonly GemType[] spawnableGems = BuildSpawnableGems();
private static readonly GemType[] SPAWNABLE_GEMS = BuildSpawnableGems();
private static GemType[] BuildSpawnableGems() {
Array values = Enum.GetValues(typeof(GemType));
@@ -31,7 +30,7 @@ namespace Utils {
}
public static GemType RandomGemType() {
return spawnableGems[Random.Range(0, spawnableGems.Length)];
return SPAWNABLE_GEMS[Random.Range(0, SPAWNABLE_GEMS.Length)];
}
}
}