Breakable class final

A block that a ground pound breaks and nothing else does.

The pair to the verb: an attack with nothing to use it on is a key with no door. Deliberately not damageable by anything else — a block that also breaks when a crate falls on it is a block a level cannot rely on.

Constructors

Breakable({String? name, required Collider collider})

Properties

brokeThisStep bool
True on the step it broke.
getter/setter pair
collider → Collider
final
hashCode int
The hash code for this object.
no setterinherited
isBroken bool
no setter
name String?
What other entities call this one, when anything does.
finalinherited
origin → Vector3
Where this is, for anything that wants to make a noise there.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
world → MechanismWorld
The world this belongs to, once it has been added to one.
no setterinherited

Methods

activate(Activation by) → ActivationOutcome
Nothing activates a block. A pound breaks it, and a pound is a body arriving rather than a hand reaching out.
collect(MechanismEvents into) → void
Reports what happened to this mechanism since the last collection.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
restore(Map<String, Object?> from) → void
Both directions, for the reason written out at Crumbling.restore.
save() Map<String, Object?>
What this mechanism holds that a save has to carry.
shatter() bool
Breaks it, if it is not already broken. Returns whether it broke now.
step(double dt) → void
Advances by dt. Called every simulation step, for every mechanism.
toString() String
A string representation of this object.
inherited

Operators

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