preUpdate method
Called before the node's update method is called. This method can be overridden to create setup work that needs to happen before the the node is updated, e.g. to calculate the node's speed.
Implementation
@override
void preUpdate(Node node, double dt) {
_lastPosition = node.position;
}