Purse class final

What somebody has picked up, counted by name.

The counting itself is Tally in the engine, which the shooter's end-of-level count uses too; what is this game's is the word — a purse is something a runner carries, and a run's total is the thing the ending adds up.

Not an inventory. Inventory in flutter3d_game_shooter holds health, armour, ammunition by type and a set of weapons, and every one of those is a shooter's idea; a platformer counts coins and stars and does not care what they are for. The two were the same class once, which is how the engine came to have ammunition in it.

Constructors

Purse()

Properties

counts → UnmodifiableMapView<String, int>
Everything held, for a readout that wants to list it.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(String what, [int howMany = 1]) → bool
Adds howMany of what and answers whether anything was added.
inherited
clear() → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restore(Map<String, Object?> from) → void
inherited
save() → Map<String, Object?>
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited
operator [](String what) → int
inherited