Esempio n. 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);
 }
Esempio n. 2
0
        public UnitGroup GetRootGroupAsUG()
        {
            UnitGroup res = GetParentGroupAsUG();

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