HealthPoints class

A representation of a character's Health Point pool

Constructors

HealthPoints({required int maximum})

Properties

current int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
maximum int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addHealth(int damage) int
Adds damage to the current Health of the character and returns the remaining health.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeHealth(int damage) int
Removes damage from the current Health of the character and returns the remaining health.
toString() String
A string representation of this object.
inherited

Operators

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