/// <summary> /// Handle higher level data that only a Client can react to /// </summary> protected override void HigherLevelDataReceived(ReceivedData data) { if (data.DataID == DataIDs.CLIENT_DISCONNECTED) { _OnClientKickedFromServer?.Invoke(client, EventArgs.Empty); } if (data.DataType == typeof(OnPropertySynchronizationEventArgs)) { byte key = ((byte[])data.ReceivedObject)[0]; PropertySynchronization sync = client.Connection.dataIDs.syncedProperties[key]; client.InvokeOnPropertySync(this, new OnPropertySynchronizationEventArgs(key, sync)); } }
internal OnPropertySynchronizationEventArgs(byte synchronizationPacketID, PropertySynchronization sync) { SynchronizationPacketID = synchronizationPacketID; PropertyName = sync.Property.Name; Instance = sync.ClassInstance; }