void Notify(AttachEvent evt, string message, AttachEventType eventType) { AttachEventInfo info = new AttachEventInfo(eventType, this); seedObject.SendMessage(message, info, SendMessageOptions.DontRequireReceiver); if (evt != null) { evt.Invoke(info); } }
void HandleEvent(AttachEventInfo info) { AttachEvent evt = events.GetOrCreateEvent(info.eventType); if (evt == null) { return; } AttachEventInfo newInfo = new AttachEventInfo(info.eventType, info.attachment, info.attachObject, sender: this); evt.Invoke(newInfo); }
void HandleEvent(AttachEventInfo info) { AttachEventInfo newInfo = new AttachEventInfo(info.eventType, info.attachObject, sender: this); if (!attachObjects.Contains(info.attachObject)) { return; } AttachEvent evt = events.GetOrCreateEvent(newInfo.eventType); if (evt != null) { evt.Invoke(newInfo); } }
void OnObjectLeft(AttachEventInfo info) { if (info.attachObject.isRemoved) { orphans.Remove(info.attachObject); info.attachObject.CleanUp(); info.attachObject.attachment = null; return; } UpdateIsConnected(); if (isDetaching && (objects.Count(phase: AttachObjectPhase.Left) + objects.Count(phase: AttachObjectPhase.Initial)) == objects.Count()) { BeginPhaseDetached(); } }
void OnObjectWillDisconnect(AttachEventInfo info) { UpdateIsConnected(); }
void OnObjectConnected(AttachEventInfo info) { UpdateIsConnected(); }