UI update 02

This commit is contained in:
FloatGaming
2026-06-30 21:21:30 +08:00
parent b2a1e307a4
commit f62f643cfc
1666 changed files with 211081 additions and 22799 deletions
+2 -28
View File
@@ -494,9 +494,7 @@ public class newTeamSelector : MonoBehaviour
private static void RebuildHeroCache()
{
cachedHeroes = Resources.LoadAll<AllyHero_SO>("so/ally");
if (cachedHeroes == null || cachedHeroes.Length == 0)
cachedHeroes = Resources.LoadAll<AllyHero_SO>("");
cachedHeroes = RuntimeResourcesCache.LoadAllAllyHeroes();
cachedHeroesById = new Dictionary<int, AllyHero_SO>();
if (cachedHeroes == null) return;
@@ -511,30 +509,6 @@ public class newTeamSelector : MonoBehaviour
private string GetRatingFromSO(AllyHero_SO so)
{
if (so == null || so.levelStats == null || so.levelStats.Count == 0) return "C";
List<AllyHero_SO.AllyLevelInfo> sorted = new List<AllyHero_SO.AllyLevelInfo>();
foreach (var level in so.levelStats)
{
if (level != null)
sorted.Add(level);
}
sorted.Sort((left, right) => left.requiredEXP.CompareTo(right.requiredEXP));
int currentExp = so.ally_currentEXP;
int selectedIndex = 0;
for (int i = 0; i < sorted.Count; i++)
{
if (currentExp >= sorted[i].requiredEXP)
selectedIndex = i;
else
break;
}
if (selectedIndex <= 0) return "C";
if (selectedIndex == 1) return "B";
if (selectedIndex == 2) return "A";
return "S";
return so != null ? so.GetDisplayLevelRatingKey() : "C";
}
}