getAnimationNames method

  1. @override
Future<List<String>> getAnimationNames(
  1. ThermionEntity entity
)
override

Implementation

@override
Future<List<String>> getAnimationNames(ThermionEntity entity) async {
  var animationCount = get_animation_count(_sceneManager!, entity);
  var names = <String>[];
  var outPtr = allocator<Char>(255);
  for (int i = 0; i < animationCount; i++) {
    get_animation_name(_sceneManager!, entity, outPtr, i);
    names.add(outPtr.cast<Utf8>().toDartString());
  }
  allocator.free(outPtr);

  return names;
}