Class StarRatingData
- Namespace
- TDMaker.Unity.Authoring
- Assembly
- TDMaker.Unity.dll
Legacy (0.x) view-side star rule, kept only so older level assets load. The rating is now computed by the core from victoryRating; LevelAsset migrates these values into it on load.
public sealed class StarRatingData
- Inheritance
-
StarRatingData
- Inherited Members
Constructors
StarRatingData()
public StarRatingData()
Fields
threeStarLives
Lives (or fraction) needed for three stars; negative means "no legacy data".
public float threeStarLives
Field Value
twoStarLives
Lives (or fraction) needed for two stars; negative means "no legacy data".
public float twoStarLives
Field Value
useFractions
When true the thresholds are fractions of the starting lives (0..1); otherwise absolute life counts.
public bool useFractions
Field Value
Properties
HasLegacyValues
Whether this holds values authored with the old rule that have not been migrated yet.
public bool HasLegacyValues { get; }
Property Value
Methods
Clear()
Marks the values as migrated.
public void Clear()
ToRatios(int)
Converts the old thresholds into life ratios (lives >= ceil(f × start) is the same as lives / start >= f).
public VictoryRatingData ToRatios(int startingLives)
Parameters
startingLivesint