public void AddChild(GameObject2D child) { if (!Children.Contains(child)) { Children.Add(child); child.Parent = this; } }
public void RemoveChild(GameObject2D child) { if (Children.Remove(child)) child.Parent = null; }