SwapChildren() public method

Swaps the indexes of two children.
public SwapChildren ( GObject child1, GObject child2 ) : void
child1 GObject A child object
child2 GObject A child object
return void
 static int SwapChildren(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GComponent obj  = (FairyGUI.GComponent)ToLua.CheckObject(L, 1, typeof(FairyGUI.GComponent));
         FairyGUI.GObject    arg0 = (FairyGUI.GObject)ToLua.CheckObject(L, 2, typeof(FairyGUI.GObject));
         FairyGUI.GObject    arg1 = (FairyGUI.GObject)ToLua.CheckObject(L, 3, typeof(FairyGUI.GObject));
         obj.SwapChildren(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#2
0
 static public int SwapChildren(IntPtr l)
 {
     try {
         FairyGUI.GComponent self = (FairyGUI.GComponent)checkSelf(l);
         FairyGUI.GObject    a1;
         checkType(l, 2, out a1);
         FairyGUI.GObject a2;
         checkType(l, 3, out a2);
         self.SwapChildren(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }