Edge case fix

Fixed an edge case where there were no cards left and it caused an error
This commit is contained in:
2025-07-29 00:34:47 +02:00
parent 352a3a8de6
commit 53c07b69f8

View File

@@ -65,6 +65,9 @@ public class CardManager : MonoBehaviour
Debug.Log($"Unlocked skills: {string.Join(", ", unlockedSkills)}");
if (shuffled.Count <= 0)
return;
float step = Screen.width / shuffled.Count;
float pos = step - Screen.width / (2*shuffled.Count);