Skip to content

Rarity

IRarityData

IRarityData is a specific type of ITagData which can be applied to an IExchangeable. Each Rarity has a default exchange value which can be used when exchanging or trading the associated IExchangeable.

Tip

A set of Rarities could include common, uncommon, epic, legendary. When trading IUpgradeableCurrency, the default exchange values for each IUpgradeableCurrency can be used to generate an exchange rate via an IExchangeRateMultiplier object. See IExchangeRateMultiplier for more details on exchanges.

Each Rarity also has a default ramping increment which is used to calculate an UpgradeableCurrency's cost in an IStoreUpgradeableCurrencyCollection. See Store Entities for more information on purchases.

RarityData

RarityData is a concrete implementation of IRarityData and TagData. Each UpgradeableCurrency in IdleKit contains a RarityData. An example usage of Rarities can be found in the missing resources exchange implementation in CanvasUpgradeableCurrencyView.

Relationships

tagandrarity