private void SendInvitationC2S(long friendId, BattleType type, InvitationState state)
        {
            InvitationMatchC2S message = new InvitationMatchC2S();

            message.friendId   = friendId;
            message.battleType = type;
            message.state      = state;

            byte[] data = ProtobufUtils.Serialize(message);
            NetworkManager.SendRequest(MsgCode.InvitationMatchMessage, data);
        }
        private void SendInvitationC2S( long friendId, BattleType type, InvitationState state )
        {
            UILockManager.SetGroupState( UIEventGroup.Middle, UIEventState.WaitNetwork );

            InvitationMatchC2S message = new InvitationMatchC2S();

            message.friendId = friendId;
            message.battleType = type;
            message.state = state;

            byte[] data = ProtobufUtils.Serialize( message );
            NetworkManager.SendRequest( MsgCode.InvitationMatchMessage, data );
        }
Esempio n. 3
0
        internal static string ToSerializedValue(this InvitationState value)
        {
            switch (value)
            {
            case InvitationState.NotSent:
                return("NotSent");

            case InvitationState.Sending:
                return("Sending");

            case InvitationState.Sent:
                return("Sent");

            case InvitationState.Failed:
                return("Failed");
            }
            return(null);
        }
 /// <summary>
 /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider"
 /// /> and <see cref="ignoreCase" />
 /// </summary>
 /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param>
 /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param>
 /// <param name="formatProvider">not used by this TypeConverter.</param>
 /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param>
 /// <returns>
 /// an instance of <see cref="InvitationState" />, or <c>null</c> if there is no suitable conversion.
 /// </returns>
 public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => InvitationState.CreateFrom(sourceValue);