private void OnComponentRemoving(ComponentCopy cmp) { // Notify Components ICmpAttachmentListener cmpInit = cmp as ICmpAttachmentListener; if (cmpInit != null) { cmpInit.OnRemoveFromGameObject(); } // Public event if (this.eventComponentRemoving != null) { this.eventComponentRemoving(this, new ComponentCopyEventArgs(cmp)); } }
private void OnComponentAdded(ComponentCopy cmp) { // Notify Components ICmpAttachmentListener cmpInit = cmp as ICmpAttachmentListener; if (cmpInit != null) { cmpInit.OnAddToGameObject(); } // Public event if (this.eventComponentAdded != null) { this.eventComponentAdded(this, new ComponentCopyEventArgs(cmp)); } }