getAnimationDuration method

  1. @override
Future<double> getAnimationDuration(
  1. ThermionEntity entity,
  2. int animationIndex
)
override

Returns the length (in seconds) of the animation at the given index.

Implementation

@override
Future<double> getAnimationDuration(
    ThermionEntity entity, int animationIndex) async {
  final result = _module.ccall(
      "get_animation_duration",
      "float",
      ["void*".toJS, "int".toJS, "int".toJS].toJS,
      [_sceneManager!, entity.toJS, animationIndex.toJS].toJS,
      null) as JSNumber;
  return result.toDartDouble;
}