Refactor, cleanup code and add documentaiton
This commit is contained in:
28
Assets/Scripts/CardSystem/Data/CardCollectionState.cs
Normal file
28
Assets/Scripts/CardSystem/Data/CardCollectionState.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using AppleHills.Data.CardSystem;
|
||||
|
||||
namespace Data.CardSystem
|
||||
{
|
||||
/// <summary>
|
||||
/// Serializable snapshot of the card collection state for save/load operations.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class CardCollectionState
|
||||
{
|
||||
public int boosterPackCount;
|
||||
public List<SavedCardEntry> cards = new List<SavedCardEntry>();
|
||||
public List<SavedCardEntry> pendingRevealCards = new List<SavedCardEntry>();
|
||||
public List<string> placedInAlbumCardIds = new List<string>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Serializable representation of a single card's saved data.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class SavedCardEntry
|
||||
{
|
||||
public string definitionId;
|
||||
public CardRarity rarity;
|
||||
public int copiesOwned;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user