Example #1
0
        /// <summary>
        /// Creates the network behavior message.
        /// </summary>
        /// <param name="fromNetworkId">From network identifier.</param>
        /// <param name="factoryId">The factory identifier.</param>
        /// <param name="type">The type.</param>
        /// <returns>The outgoing message</returns>
        private OutgoingMessage CreateNetworkBehaviorMessage(string fromNetworkId, string factoryId, NetworkSyncType type)
        {
            var message = this.networkService.CreateClientMessage(MessageType.Synchronization);

            message.Write(this.SceneId);
            message.Write(this.networkService.ClientIdentifier);
            message.Write((int)type);
            message.Write(fromNetworkId);
            message.Write(factoryId);
            return(message);
        }
Example #2
0
 /// <summary>
 /// Creates the network behavior message.
 /// </summary>
 /// <param name="fromNetworkId">From network identifier.</param>
 /// <param name="factoryId">The factory identifier.</param>
 /// <param name="type">The type.</param>
 /// <returns>The outgoing message</returns>
 private OutgoingMessage CreateNetworkBehaviorMessage(string fromNetworkId, string factoryId, NetworkSyncType type)
 {
     var message = this.networkService.CreateClientMessage(MessageType.Synchronization);
     message.Write(this.SceneId);
     message.Write(this.networkService.ClientIdentifier);
     message.Write((int)type);
     message.Write(fromNetworkId);
     message.Write(factoryId);
     return message;
 }