entityTree method

void entityTree(
  1. Entity<T> entity,
  2. num x,
  3. num y,
  4. num fontSize, {
  5. ColorD? color,
  6. String? prefix,
})

Implementation

void entityTree(
  Entity<T> entity,
  num x,
  num y,
  num fontSize, {
    ColorD? color,
    String? prefix,
  }
) {
  final yRef = [y.toInt()];
  backend.render.drawText('$entity', x, y, fontSize, color ?? .WHITE);
  yRef[0] += fontSize.toInt();
  for (final comp in entity.getComponents()) {
    tree(comp, x, yRef[0], fontSize, prefix ?? '', color ?? .WHITE, yRef);
  }
}