public void ChangeParentTo(Formation newParent) { if (newParent != null) { newParent.AddSubFormation(this); } else { if (GetParentFormation() != null) { GetParentFormation().RemoveSubFormation(this); } } }
private void RemoveSubFormation(Formation child) { child.Internal_SetParentFormation(null); GetSubFormations().Remove(child); }
public void Internal_SetParentFormation(Formation newParent) { _parent.Value = newParent; }