/// <summary> /// Find child and destroy child and component parameter /// </summary> /// <param name="component">parent, will be destroy with all child connected</param> public void FindChildAndDestroy() { if (next != null) { next.FindChildAndDestroy(); } RemoveComponent(); }
void RemoveBranch(int index) { DIVisualComponent removedComp = splitedComponent[index]; if (removedComp != null) { removedComp.FindChildAndDestroy(); } splitedComponent.RemoveAt(index); }
void RemoveBranch() { DIVisualComponent removedComp = splitedComponent[splitedComponent.Count - 1]; if (removedComp != null) { removedComp.FindChildAndDestroy(); } splitedComponent.RemoveAt(splitedComponent.Count - 1); }