updateWorldTransform method Null safety

  1. @mustCallSuper
void updateWorldTransform()
@mustCallSuper, inherited

Implementation

@mustCallSuper
void updateWorldTransform() {
  _renderOpacity = opacity;
  if (parent is TransformComponent) {
    var parentNode = parent as TransformComponent;
    _renderOpacity *= parentNode.childOpacity;
    Mat2D.multiply(worldTransform, parentNode.worldTransform, transform);
  } else {
    Mat2D.copy(worldTransform, transform);
  }
}