/// <summary>
 /// Coordinator will perform client side validation of the interaction using its validators. If any
 /// validator fails, validation will fail and NOTHING_HAPPENED will be returned.
 /// If validation succeeds, it will send RequestInteractMessage to the server to request the server
 /// to perform the interaction.
 /// </summary>
 /// <param name="interaction">interaction being performed.</param>
 /// <param name="specificComponent">Name of specific component on the object to be targeted by the interaction.</param>
 /// <returns>if validation succeeded</returns>
 public bool ClientValidateAndRequest(T interaction, string specificComponent = null)
 {
     if (willInteract != null && !willInteract.Invoke(interaction, NetworkSide.Client))
     {
         return(false);
     }
     InteractionMessageUtils.SendRequest(interaction, processor, specificComponent);
     return(true);
 }
Exemplo n.º 2
0
    public bool Interact(HandApply interaction)
    {
        if (!DefaultWillInteract.HandApply(interaction, NetworkSide.Client))
        {
            return(false);
        }

        InteractionMessageUtils.SendRequest(interaction, this);
        return(true);
    }