Beispiel #1
0
 private void OnNetMessageReceived(NetMessageDestroyValue destroyMessage, INetworkInterfaceConnection arg2)
 {
     if (NetSerializer.IsValidType(destroyMessage.TypeId))
     {
         Type type      = NetSerializer.GetTypeFromId(destroyMessage.TypeId);
         var  container = SyncedValues.GetContainer(type);
         if (container != null)
         {
             SyncedValues.DestroyContainer(container);
         }
     }
 }
Beispiel #2
0
            private void OnNetMessageReceived(NetMessageSyncValue syncMessage, INetworkInterfaceConnection arg2)
            {
                if (syncMessage.ValueData == null)
                {
                    return;
                }

                // get value type
                Type type = NetMessageInterpreter.GetMessageType(syncMessage.ValueData);

                // find synced obj
                SyncedValueContainer container = SyncedValues.GetOrCreateContainer(type);

                // set data
                container.SetRawData(syncMessage.ValueData);

                container.RaiseChangeEventIfNecessary();
            }
Beispiel #3
0
            public virtual void Dispose()
            {
                SyncedValues.s_DriverInstance = null;

                SyncedValues.DestroyAllValues();
            }