UI换了很多,spine主视觉停用
This commit is contained in:
@@ -71,11 +71,21 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
|
||||
initialized = true;
|
||||
StoreOwnershipPayload payload;
|
||||
StoreOwnershipStorage.TryLoad(out payload);
|
||||
bool loadedFromSave = StoreOwnershipStorage.TryLoad(out payload);
|
||||
RebuildFromPayload(payload);
|
||||
LoadStoreItems();
|
||||
SyncAllMirrorFlags();
|
||||
SaveNow();
|
||||
|
||||
bool recoveredFromMirrors = false;
|
||||
if (!loadedFromSave)
|
||||
{
|
||||
recoveredFromMirrors = SeedFromCurrentMirrorFlags();
|
||||
}
|
||||
|
||||
if (loadedFromSave || recoveredFromMirrors)
|
||||
{
|
||||
SyncAllMirrorFlags();
|
||||
SaveNow();
|
||||
}
|
||||
}
|
||||
|
||||
public void ForceSyncMirrorFlags()
|
||||
@@ -132,7 +142,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
break;
|
||||
|
||||
default:
|
||||
failureMessage = "当前未配置发放逻辑";
|
||||
failureMessage = LocalizationService.Get("store.error.grant_logic_missing", "当前未配置发放逻辑");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -149,7 +159,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
|
||||
if (itemSO == null)
|
||||
{
|
||||
failureMessage = "商品数据丢失";
|
||||
failureMessage = LocalizationService.Get("store.error.item_data_missing", "商品数据丢失");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -255,7 +265,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void SeedFromCurrentMirrorFlags()
|
||||
private bool SeedFromCurrentMirrorFlags()
|
||||
{
|
||||
bool changed = false;
|
||||
for (int i = 0; i < cachedStoreItems.Count; i++)
|
||||
@@ -276,10 +286,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed)
|
||||
{
|
||||
SaveNow();
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
|
||||
private StoreOwnershipEntry TrySeedEntry(storeItemSO itemSO)
|
||||
@@ -446,13 +453,13 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
failureMessage = string.Empty;
|
||||
if (itemSO == null)
|
||||
{
|
||||
failureMessage = "商品数据丢失";
|
||||
failureMessage = LocalizationService.Get("store.error.item_data_missing", "商品数据丢失");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsOwned(itemSO))
|
||||
{
|
||||
failureMessage = "物品已解锁";
|
||||
failureMessage = LocalizationService.Get("store.error.item_already_unlocked", "物品已解锁");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -461,7 +468,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
case storeItemSO.ItemType.character:
|
||||
if (itemSO.associatedAllyHero == null)
|
||||
{
|
||||
failureMessage = "角色数据未配置";
|
||||
failureMessage = LocalizationService.Get("store.error.character_data_missing", "角色数据未配置");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -469,7 +476,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
case storeItemSO.ItemType.song:
|
||||
if (itemSO.associatedSong == null)
|
||||
{
|
||||
failureMessage = "歌曲数据未配置";
|
||||
failureMessage = LocalizationService.Get("store.error.song_data_missing", "歌曲数据未配置");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -477,7 +484,7 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
case storeItemSO.ItemType.storyPassage:
|
||||
if (itemSO.associatedStoryPassage == null)
|
||||
{
|
||||
failureMessage = "剧情数据未配置";
|
||||
failureMessage = LocalizationService.Get("store.error.story_data_missing", "剧情数据未配置");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -485,14 +492,14 @@ public sealed class StoreOwnershipLedger : MonoBehaviour
|
||||
{
|
||||
if (itemSO.associatedStorySonId < 0 || FindStorySonIndex(itemSO.associatedStoryPassage, itemSO.associatedStorySonId) < 0)
|
||||
{
|
||||
failureMessage = "剧情子章节未配置";
|
||||
failureMessage = LocalizationService.Get("store.error.story_chapter_missing", "剧情子章节未配置");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
default:
|
||||
failureMessage = "当前未配置发放逻辑";
|
||||
failureMessage = LocalizationService.Get("store.error.grant_logic_missing", "当前未配置发放逻辑");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user