namespace pdinklag.CPW.Common
{
    /// <summary>
    /// Represents an ongoing grab.
    /// 
    /// Functioning instances of this only exist on network authorities (i.e., the host),
    /// while clients will deal with dummy objects.
    /// </summary>
    public interface IGrab
    {
        /// <summary>
        /// Grab callback function type.
        /// </summary>
        /// <param name="who">the wrestler who was grabbed</param>
        /// <param name="grabbedBodyPart">the body part of that wrestler that was grabbed</param>
        /// <returns>the move to perform with the grabbed wrestler -- if valid, the instigator's current move is immediately stopped</returns>
        public delegate AssetAddress GrabCallback(IWrestler who, RagdollPart grabbedBodyPart);

        /// <summary>
        /// The callback for the event that a wrestler was grabbed.
        /// </summary>
        GrabCallback OnGrab { set; }

        /// <summary>
        /// Ends the grab.
        /// </summary>
        void End();
    }
}
