示例#1
0
        protected void AddChildAndDeletePrevious(BComponent unit)
        {
            unit.parent          = this;
            unit.behaviorManager = behaviorManager;
            unit.KeepVisible();

            behaviors = new BComponent[] { unit };
            window.WaitFadeOffFroUnits();
        }
示例#2
0
        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();
        }