PushableApi class

API that handles pushable behavior for a component.

To use this behavior the parent component must have a Movement mixin.

Constructors

PushableApi(Movement _comp)

Properties

enabled bool
Whether the pushable behavior is enabled.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Releases the registered push listener.
handleCollision(Set<Vector2> intersectionPoints, PositionComponent other) → void
Handles collision from another component and applies push if needed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPushListener(OnPushCallback callback) → void
Registers a callback that decides if the component can be pushed.
setup({bool? enabled, PushableFromEnum? pushableFrom, bool? pushPerCellEnabled, Vector2? cellSize, double? pushPerCellDuration, Curve? pushPerCellCurve}) → void
Sets up pushable behavior.
toString() String
A string representation of this object.
inherited

Operators

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