preUpdate method

  1. @override
void preUpdate(
  1. Node node,
  2. double dt
)
override

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;
}