/// <summary> /// Create a new <see cref="ActionController"/> for this <see cref="Mannequin"/> from the specified <paramref name="entity"/> and <paramref name="context"/>. /// </summary> /// <returns>The created <see cref="ActionController"/>.</returns> /// <param name="entity">The <see cref="Entity"/> to which the <see cref="ActionController"/> will belong.</param> /// <param name="context">The <see cref="AnimationContext"/> for the <see cref="ActionController"/>.</param> public ActionController CreateActionController(Entity entity, AnimationContext context) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } if (context == null) { throw new ArgumentNullException(nameof(context)); } var nativeObj = NativeHandle.CreateActionController(entity.NativeHandle, context.NativeHandle); return(nativeObj == null ? null : new ActionController(nativeObj)); }