update method

void update(
  1. double dt
)

Updates the movement state.

Implementation

void update(double dt) {
  if (_enabled && _moving && _targetCellPosition != null) {
    if (_comp.position.distanceTo(_targetCellPosition!) < 1.0) {
      _comp.stop();
      _moving = false;
      _targetCellPosition = null;
    }
  }
}