getParent method

  1. @override
Future<ThermionEntity?> getParent(
  1. ThermionEntity child
)
override

Gets the parent transform of child.

Implementation

@override
Future<ThermionEntity?> getParent(ThermionEntity child) async {
  final parentId = _module.ccall(
      "get_parent",
      "int",
      ["void*".toJS, "int32_t".toJS].toJS,
      [_sceneManager!, child.toJS].toJS,
      null) as JSNumber;
  if (parentId.toDartInt == -1) {
    return null;
  }
  return parentId.toDartInt;
}