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
@@ -404,26 +404,7 @@ class AllyHeroGraphView : GraphView
private int GetCurrentLevelIndex(AllyHero_SO so)
{
if (so.levelStats == null || so.levelStats.Count == 0) return -1;
int bestIndex = -1;
int currentExp = so.ally_currentEXP;
for (int i = 0; i < so.levelStats.Count; i++)
{
var lvl = so.levelStats[i];
if (lvl == null) continue;
if (bestIndex < 0)
{
bestIndex = i;
if (currentExp < lvl.requiredEXP) continue;
}
var best = so.levelStats[bestIndex];
if (best == null) continue;
if (currentExp >= lvl.requiredEXP && lvl.requiredEXP >= best.requiredEXP)
{
bestIndex = i;
}
}
return bestIndex < 0 ? 0 : bestIndex;
return so != null ? so.GetDisplayLevelIndex() : -1;
}
private string FormatNumber(float value)