Interface ISaveStore

Namespace
TDMaker.Unity.Campaign
Assembly
TDMaker.Unity.dll

Where save slots live. Implementations never throw from these calls: failures are reported through the return values (and a console warning). Slot numbers start at 0. Unreadable content is never deleted silently: it is kept as a backup.

public interface ISaveStore

Properties

SlotCount

Number of slots offered (slot pickers show this many).

int SlotCount { get; }

Property Value

int

Methods

Delete(int)

Deletes a slot (the player asked for it). Returns false on failure.

bool Delete(int slot)

Parameters

slot int

Returns

bool

Exists(int)

Whether slot holds data.

bool Exists(int slot)

Parameters

slot int

Returns

bool

Load(int, out ProfileData)

Reads a slot. data is set for Loaded and Migrated.

SaveLoadStatus Load(int slot, out ProfileData data)

Parameters

slot int
data ProfileData

Returns

SaveLoadStatus

Save(int, ProfileData)

Writes a slot (all or nothing where the storage allows it). Returns false on failure.

bool Save(int slot, ProfileData data)

Parameters

slot int
data ProfileData

Returns

bool