Optimize arrow finding code & add commas to scores

This commit is contained in:
2025-06-05 21:31:48 -07:00
parent ccc6a5431c
commit a69f4cc73d
10 changed files with 54 additions and 33 deletions

View File

@@ -1,4 +1,5 @@
using UnityEngine;
using System.Numerics;
using UnityEngine;
public static class Tools
{
@@ -15,9 +16,28 @@ public static class Tools
else if (user == 4)
{
return Resources.Load<Sprite>("Icons/Icons/bird_-3");
} else
}
else
{
return Resources.Load<Sprite>("Icons/Icons/bird_1");
}
}
public static string FormatWithCommas(string number)
{
try
{
BigInteger bigInt = BigInteger.Parse(number);
return FormatWithCommas(bigInt);
}
catch
{
return number;
}
}
public static string FormatWithCommas(BigInteger number)
{
return string.Format("{0:N0}", number);
}
}