protected void AddChildAndDeletePrevious(BComponent unit) { unit.parent = this; unit.behaviorManager = behaviorManager; unit.KeepVisible(); behaviors = new BComponent[] { unit }; window.WaitFadeOffFroUnits(); }
public virtual void AddChild(BComponent child, int index) { List <BComponent> result; if (behaviors == null) { result = new List <BComponent>(); } else { result = new List <BComponent>(behaviors); } child.parent = this; child.behaviorManager = behaviorManager; child.KeepVisible(); result.Insert(index, child); behaviors = result.ToArray(); window.WaitFadeOffFroUnits(); }