Esempio n. 1
0
        /* Variables */

        /* Setter & Getter */

        /* Functions */

        private void Start()
        {
            // if already sorted, return.
            if (this.Sorted)
            {
                return;
            }

            // get the parent.
            Transform parentObj = this.transform.parent;

            if (parentObj != null)
            {
                // get all the jcs_panellayer in the scene
                JCS_GUIComponentLayer[] jcspls = parentObj.GetComponentsInChildren <JCS_GUIComponentLayer>();

                JCS_Sort <JCS_GUIComponentLayer> jcsS = new JCS_Sort <JCS_GUIComponentLayer>();

                jcsS.AddAll(jcspls);

                jcspls = jcsS.InsertionSort();

                OriganizeChildOrder(jcspls);
            }
        }
Esempio n. 2
0
        //----------------------
        // Public Variables

        //----------------------
        // Private Variables

        //----------------------
        // Protected Variables

        //========================================
        //      setter / getter
        //------------------------------

        //========================================
        //      Unity's function
        //------------------------------
        private void Start()
        {
            // if already sorted, return.
            if (this.Sorted)
            {
                return;
            }

            // get all the jcs_panellayer in the scene
            JCS_PanelLayer[] jcspls = (JCS_PanelLayer[])Resources.FindObjectsOfTypeAll(typeof(JCS_PanelLayer));

            JCS_Sort <JCS_PanelLayer> jcsS = new JCS_Sort <JCS_PanelLayer>();

            jcsS.AddAll(jcspls);

            jcspls = jcsS.InsertionSort();

            OriganizeChildOrder(jcspls);
        }