update method
This method can be used if there are things that needs to be prepared in each tick.
Implementation
@override
void update() {
// Between two ticks the hitboxes only move a little, so [items] is
// always nearly sorted: an insertion sort runs in close to linear time
// here, where a general-purpose sort would pay its full O(n log n) on
// every tick. The comparator is a static tear-off, so nothing is
// allocated per tick.
insertionSort(items, compare: _compareMinX);
}