MovePerCellApi class
API that handles movement per cell for a component.
The parent component must have a Movement mixin.
Constructors
- MovePerCellApi(Movement _comp)
Properties
- cellSize → Vector2
-
The configured cell size. Falls back to the component size.
no setter
- enabled → bool
-
Whether movement per cell 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
-
moveByAngle(
double angle, {double? speed}) → void - Initiates movement by angle restricted to the four main directions.
-
moveDown(
{double? speed, bool resetCrossAxis = false}) → void - Initiates a down movement by one cell.
-
moveLeft(
{double? speed, bool resetCrossAxis = false}) → void - Initiates a left movement by one cell.
-
moveRight(
{double? speed, bool resetCrossAxis = false}) → void - Initiates a right movement by one cell.
-
moveUp(
{double? speed, bool resetCrossAxis = false}) → void - Initiates a up movement by one cell.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setup(
{bool? enabled, bool? pushPerCellEnabled, Vector2? cellSize, double? pushPerCellDuration, Curve? pushPerCellCurve}) → void - Sets up movement per cell behavior.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
double dt) → void - Updates the movement state.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited