Class VictoryRatingDef
Immutable three-tier victory rating using the remaining/starting life ratio, with inclusive thresholds.
public sealed class VictoryRatingDef
- Inheritance
-
VictoryRatingDef
- Inherited Members
Constructors
VictoryRatingDef(float, float)
Creates authored life-ratio bands. Equal thresholds are allowed; the highest matching tier wins.
public VictoryRatingDef(float twoStarLifeRatio, float threeStarLifeRatio)
Parameters
Properties
ThreeStarLifeRatio
Minimum life ratio for three stars.
public float ThreeStarLifeRatio { get; }
Property Value
TwoStarLifeRatio
Minimum life ratio for two stars; lower positive ratios earn one star.
public float TwoStarLifeRatio { get; }
Property Value
Methods
Evaluate(int, int)
Returns zero for no remaining lives, otherwise one to three stars. Extra lives are capped at the starting total for this ratio.
public int Evaluate(int remainingLives, int startingLives)