onUpdate method
Override to react during the update phase each frame.
Called after all registered listenOnUpdate listeners.
Implementation
@override
void onUpdate(double dt) => entity.onTransform((t) {
final w = size.x * t.scale.x;
final h = size.y * t.scale.y;
rect.set(t.position.x - w / 2, t.position.y - h / 2, w, h);
origin.set(w / 2, h / 2);
});