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
+1 -1
View File
@@ -160,7 +160,7 @@ public class CharacterCardView : MonoBehaviour, IBeginDragHandler, IDragHandler,
return false;
}
AllyHero_SO[] heroes = Resources.LoadAll<AllyHero_SO>("");
AllyHero_SO[] heroes = RuntimeResourcesCache.LoadAllAllyHeroes();
for (int i = 0; i < heroes.Length; i++)
{
AllyHero_SO hero = heroes[i];
+1 -1
View File
@@ -1035,7 +1035,7 @@ public static class TeamShareCodec
return;
}
cachedHeroes = Resources.LoadAll<AllyHero_SO>(string.Empty);
cachedHeroes = RuntimeResourcesCache.LoadAllAllyHeroes();
cachedHeroById = new Dictionary<int, AllyHero_SO>();
if (cachedHeroes == null)
{
+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";
}
}
@@ -144,7 +144,7 @@ public class loadSettlementTeamPrefab : MonoBehaviour
AllyHero_SO resolvedHeroSO = null;
if (allyId > 0)
{
var arr = Resources.LoadAll<AllyHero_SO>("");
var arr = RuntimeResourcesCache.LoadAllAllyHeroes();
foreach (var a in arr)
{
if (a != null && a.ally_heroID == allyId) { resolvedHeroSO = a; break; }
+1 -1
View File
@@ -264,7 +264,7 @@ public class teamSettingPanel : MonoBehaviour
return false;
}
AllyHero_SO[] heroes = Resources.LoadAll<AllyHero_SO>("");
AllyHero_SO[] heroes = RuntimeResourcesCache.LoadAllAllyHeroes();
for (int i = 0; i < heroes.Length; i++)
{
AllyHero_SO hero = heroes[i];