FairyGUI.Relations.Remove C# (CSharp) Method

Remove() public method

public Remove ( GObject target, RelationType relationType ) : void
target GObject
relationType RelationType
return void
        public void Remove(GObject target, RelationType relationType)
        {
            int cnt = _items.Count;
            int i = 0;
            while (i < cnt)
            {
                RelationItem item = _items[i];
                if (item.target == target)
                {
                    item.Remove(relationType);
                    if (item.isEmpty)
                    {
                        item.Dispose();
                        _items.RemoveAt(i);
                        cnt--;
                        continue;
                    }
                    else
                        i++;
                }
                i++;
            }
        }

Usage Example

 static public int Remove(IntPtr l)
 {
     try {
         FairyGUI.Relations self = (FairyGUI.Relations)checkSelf(l);
         FairyGUI.GObject   a1;
         checkType(l, 2, out a1);
         FairyGUI.RelationType a2;
         checkEnum(l, 3, out a2);
         self.Remove(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.Relations::Remove