Exemplo n.º 1
0
 /// <summary>
 /// Subscribe to the bodyUpdated event, which is called when a tracked body has updated data
 /// </summary>
 /// <param name="user">The functionality user</param>
 /// <param name="bodyUpdated">The delegate to subscribe</param>
 public static void SubscribeBodyUpdated(this IUsesMarsBodyTracking user, Action <IMarsBody> bodyUpdated)
 {
     user.provider.BodyUpdated += bodyUpdated;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Unsubscribe a delegate from the bodyRemoved event
 /// </summary>
 /// <param name="user">The functionality user</param>
 /// <param name="bodyRemoved">The delegate to unsubscribe</param>
 public static void UnsubscribeBodyRemoved(this IUsesMarsBodyTracking user, Action <IMarsBody> bodyRemoved)
 {
     user.provider.BodyRemoved -= bodyRemoved;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Get the currently tracked bodies
 /// </summary>
 /// <param name="user">The functionality user</param>
 /// <param name="bodies">A list of IMarsBody objects to which the currently tracked bodies will be added</param>
 public static void GetBodies(this IUsesMarsBodyTracking user, List <IMarsBody> bodies)
 {
     user.provider.GetBodies(bodies);
 }