Пример #1
0
 public void Internal_AddSubGroup(UnitGroup child)
 {
     if (child.GetParentGroupAsUG() != null)
     {
         child.GetParentGroupAsUG().Internal_RemoveSubGroup(child);
     }
     child.Internal_SetParentGroup(this);
     GetSubGroupsAsUG().Add(child);
     //onSubGroupAdded.Invoke(child);
 }
Пример #2
0
        public UnitGroup GetRootGroupAsUG()
        {
            UnitGroup res = GetParentGroupAsUG();

            if (res != null)
            {
                res = res.GetRootGroupAsUG();
            }
            else
            {
                res = this;
            }
            return(res);
        }
Пример #3
0
 public void Internal_RemoveSubGroup(UnitGroup child)
 {
     child.Internal_SetParentGroup(null);
     GetSubGroupsAsUG().Remove(child);
     //onSubGroupRemoved.Invoke(child);
 }
Пример #4
0
 public void Internal_SetParentGroup(UnitGroup newParent)
 {
     _parent.Value = newParent as UnitGroup;
 }