FairyGUI.GComponent.RemoveController C# (CSharp) Method

RemoveController() public method

Removes a controller from the container.
public RemoveController ( FairyGUI.Controller c ) : void
c FairyGUI.Controller Controller object.
return void
        public void RemoveController(Controller c)
        {
            int index = _controllers.IndexOf(c);
            if (index == -1)
                throw new Exception("controller not exists: " + c.name);

            c.parent = null;
            _controllers.RemoveAt(index);

            int cnt = _children.Count;
            for (int i = 0; i < cnt; ++i)
            {
                GObject child = _children[i];
                child.HandleControllerChanged(c);
            }
        }

Usage Example

示例#1
0
 static public int RemoveController(IntPtr l)
 {
     try {
         FairyGUI.GComponent self = (FairyGUI.GComponent)checkSelf(l);
         FairyGUI.Controller a1;
         checkType(l, 2, out a1);
         self.RemoveController(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of FairyGUI.GComponent::RemoveController