UI换了很多,spine主视觉停用

This commit is contained in:
FloatGaming
2026-06-15 20:17:25 +08:00
parent 5eec879582
commit 216ab08e8d
3634 changed files with 814422 additions and 382766 deletions
@@ -76,6 +76,7 @@ public sealed class ExpBottleLedger : MonoBehaviour
loadedFromSave = ExpBottleLedgerStorage.TryLoad(out payload);
RebuildFromPayload(payload);
initialized = true;
TryRecoverFromDefaultPlayerData();
SyncMirrorCounts();
SaveNow();
if (OnLedgerReloaded != null)
@@ -421,6 +422,46 @@ public sealed class ExpBottleLedger : MonoBehaviour
}
}
private bool TryRecoverFromDefaultPlayerData()
{
Player_SO player = RuntimeResourcesCache.LoadDefaultPlayerSo();
if (player == null)
{
return false;
}
bool changed = false;
for (int i = 0; i < ExpBottleCatalog.All.Count; i++)
{
var descriptor = ExpBottleCatalog.All[i];
if (string.IsNullOrEmpty(descriptor.LegacyPlayerFieldName))
{
continue;
}
int legacyValue = Mathf.Max(0, player.GetLegacyExpBottleCount(descriptor.LegacyPlayerFieldName));
if (legacyValue <= 0)
{
continue;
}
if (GetCountByKey(descriptor.Key) > 0)
{
continue;
}
countsByKey[descriptor.Key] = legacyValue;
changed = true;
}
if (changed)
{
Debug.LogWarning("[ExpBottleLedger] Recovered bottle counts from Player_SO mirror fields.");
}
return changed;
}
private void SyncToPlayerData()
{
if (boundPlayerData == null)