FairyGUI.Container.ChangeChildrenOrder C# (CSharp) Method

ChangeChildrenOrder() public method

public ChangeChildrenOrder ( List indice, List objs ) : void
indice List
objs List
return void
        public void ChangeChildrenOrder(List<int> indice, List<DisplayObject> objs)
        {
            int cnt = indice.Count;
            for (int i = 0; i < cnt; i++)
            {
                DisplayObject obj = objs[i];
                if (obj.parent != this)
                    throw new Exception("Not a child of this container");

                _children[indice[i]] = obj;
            }
            InvalidateBatchingState(true);
        }

Usage Example

示例#1
0
 static int ChangeChildrenOrder(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         FairyGUI.Container obj = (FairyGUI.Container)ToLua.CheckObject <FairyGUI.Container>(L, 1);
         System.Collections.Generic.IList <int> arg0 = (System.Collections.Generic.IList <int>)ToLua.CheckObject <System.Collections.Generic.IList <int> >(L, 2);
         System.Collections.Generic.IList <FairyGUI.DisplayObject> arg1 = (System.Collections.Generic.IList <FairyGUI.DisplayObject>)ToLua.CheckObject <System.Collections.Generic.IList <FairyGUI.DisplayObject> >(L, 3);
         obj.ChangeChildrenOrder(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
All Usage Examples Of FairyGUI.Container::ChangeChildrenOrder