FairyGUI.GComponent.SwapChildrenAt C# (CSharp) Method

SwapChildrenAt() public method

Swaps the indexes of two children.
public SwapChildrenAt ( int index1, int index2 ) : void
index1 int index of first child
index2 int index of second child
return void
        public void SwapChildrenAt(int index1, int index2)
        {
            GObject child1 = _children[index1];
            GObject child2 = _children[index2];

            SetChildIndex(child1, index2);
            SetChildIndex(child2, index1);
        }

Usage Example

 static int SwapChildrenAt(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.GComponent obj = (FairyGUI.GComponent)ToLua.CheckObject(L, 1, typeof(FairyGUI.GComponent));
         int arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         int arg1 = (int)LuaDLL.luaL_checknumber(L, 3);
         obj.SwapChildrenAt(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
All Usage Examples Of FairyGUI.GComponent::SwapChildrenAt