/// <summary> /// Uses the coordinator to validate and attempt the interaction on the client side. /// </summary> /// <param name="info"></param> /// <param name="coordinator"></param> /// <typeparam name="T">type of interaction</typeparam> /// <returns>If validation succeeds and coordinator sends the interaciton msg, invokes /// onValidationSuccess and returns STOP_PROCESSING. Otherwise returns CONTINUE_PROCESSING.</returns> public static bool CoordinatedInteract <T>(T info, InteractionCoordinator <T> coordinator, Action <T> onValidationSuccess) where T : Interaction { var validated = coordinator.ClientValidateAndRequest(info); if (validated) { //success, so do client prediction if not server player if (!CustomNetworkManager.Instance._isServer) { onValidationSuccess.Invoke(info); } } return(validated); }
public InteractionResult Interact(T5 info) { return(coordinator.ClientValidateAndRequest(info)); }