Class UpgradeRunRecord

Namespace
TDMaker.Unity.View
Assembly
TDMaker.Unity.dll

The permanent upgrades of one run: the shop's name, the purchased rank of every track and the forced rank (-1 = none). Saved next to a recorded command log (<file>.upgrades.json) so a replay rebuilds the same snapshot.

public sealed class UpgradeRunRecord
Inheritance
UpgradeRunRecord
Inherited Members

Constructors

UpgradeRunRecord()

public UpgradeRunRecord()

Fields

forcedRank

Rank forced on every track, or -1.

public int forcedRank

Field Value

int

ranks

Purchased rank per track key.

public List<UpgradeRankRecord> ranks

Field Value

List<UpgradeRankRecord>

shop

Name of the shop asset (informational).

public string shop

Field Value

string

Methods

Capture(UpgradeShopAsset, Func<string, int>, int)

Copies the ranks purchased reports for every track of shop.

public static UpgradeRunRecord Capture(UpgradeShopAsset shop, Func<string, int> purchased, int forced = -1)

Parameters

shop UpgradeShopAsset
purchased Func<string, int>
forced int

Returns

UpgradeRunRecord

HasEffect(UpgradeShopAsset)

Whether the record applies any rank of shop.

public bool HasEffect(UpgradeShopAsset shop)

Parameters

shop UpgradeShopAsset

Returns

bool

RankOf(string)

Purchased rank of track (0 when absent).

public int RankOf(string track)

Parameters

track string

Returns

int