translate method

void translate(
  1. Vector2 displacement
)

Method used to translate component

Implementation

void translate(Vector2 displacement) {
  this.displacement = displacement;
  _updateLastDirection(displacement);
  position.add(displacement);
}