Edge case fix
Fixed an edge case where there were no cards left and it caused an error
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user