FairyGUI.GComponent.ChildSortingOrderChanged C# (CSharp) 메소드

ChildSortingOrderChanged() 개인적인 메소드

private ChildSortingOrderChanged ( GObject child, int oldValue, int newValue ) : void
child GObject
oldValue int
newValue int
리턴 void
        internal void ChildSortingOrderChanged(GObject child, int oldValue, int newValue)
        {
            if (newValue == 0)
            {
                _sortingChildCount--;
                SetChildIndex(child, _children.Count);
            }
            else
            {
                if (oldValue == 0)
                    _sortingChildCount++;

                int oldIndex = _children.IndexOf(child);
                int index = GetInsertPosForSortingChild(child);
                if (oldIndex < index)
                    _SetChildIndex(child, oldIndex, index - 1);
                else
                    _SetChildIndex(child, oldIndex, index);
            }
        }