applyConstraints method

void applyConstraints (
  1. double dt

Called to apply the constraints to the node. Normally, this method is called automatically by the SpriteBox, but it can be called manually if the constraints need to be applied immediately.


void applyConstraints(double dt) {
  if (_constraints == null) return;

  for (Constraint constraint in _constraints) {
    constraint.constrain(this, dt);