public bool RemoveChild(DisplayObject obj)
 {
     if (!children.Remove(obj))
     {
         return(false);
     }
     obj.DispatchEvent(new Event(Event.REMOVED_FROM_STAGE));
     obj.parent = null;
     obj.stage  = null;
     return(true);
 }
 public bool AddChild(DisplayObject obj)
 {
     if (obj.parent != null)
     {
         return(false);
     }
     children.Add(obj);
     obj.parent = this;
     obj.DispatchEvent(new Event(Event.ADDED_TO_STAGE));
     obj.GlobalTransform = transformMatrix;
     return(true);
 }
Beispiel #3
0
 public bool AddChild(DisplayObject obj)
 {
     if (obj.parent != null)
     {
         return false;
     }
     children.Add(obj);
     obj.parent = this;
     obj.DispatchEvent(new Event(Event.ADDED_TO_STAGE));
     obj.GlobalTransform = transformMatrix;
     return true;
 }
 public bool AddChildAt(DisplayObject obj, int index)
 {
     if (obj.parent != null)
     {
         return(false);
     }
     // Вставка перед объектом с индексом index
     children.Insert(index + 1, obj);
     obj.parent = this;
     obj.DispatchEvent(new Event(Event.ADDED_TO_STAGE));
     obj.GlobalTransform = transformMatrix;
     return(true);
 }
Beispiel #5
0
 public bool AddChildAt(DisplayObject obj, int index)
 {
     if (obj.parent != null)
     {
         return false;
     }
     // Вставка перед объектом с индексом index
     children.Insert(index + 1, obj);
     obj.parent = this;
     obj.DispatchEvent(new Event(Event.ADDED_TO_STAGE));
     obj.GlobalTransform = transformMatrix;
     return true;
 }
Beispiel #6
0
 public bool RemoveChild(DisplayObject obj)
 {
     if (!children.Remove(obj))
     {
         return false;
     }
     obj.DispatchEvent(new Event(Event.REMOVED_FROM_STAGE));
     obj.parent = null;
     obj.stage = null;
     return true;
 }