LevelDefinition class

One rung of the XP curve. level is 1-based; the LAST entry in a curve must have xpToNext == 0 — that's what marks it the max level (nothing further to grind toward). Every other entry needs xpToNext > 0, and the curve must be non-decreasing (a later level never costs less XP to clear than an earlier one) — see validateLevelCurve.

Constructors

LevelDefinition({required int level, required int xpToNext, List<RewardLine> unlockRewardLines = const []})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
level → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unlockRewardLines → List<RewardLine>
Granted once, through RewardTransactionPipeline, the first time a player reaches level — see PlayerProgressionService.grantXp.
final
xpToNext → int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited