Esempio n. 1
0
        public void LateUpdate()
        {
            if (m_listUsingComponent != null && m_listUsingComponent.Count > 0 && ModalHelper.IsModalExit())
            {
                for (int i = 0; i < m_listUsingComponent.Count; ++i)
                {
                    {
                        m_listUsingComponent[i].GetTransform.SetParent(UISystem.Instance.transform);
                        m_listUsingComponent[i].GetTransform.SetAsLastSibling();
                    }
                }
                m_bNeedUpdateSibling = false;
            }
            else if (m_listUsingComponent != null && m_listUsingComponent.Count > 0 && m_bNeedUpdateSibling && !ModalHelper.IsModalExit())
            {
                for (int i = 0; i < m_listUsingComponent.Count; ++i)
                {
                    {
                        m_listUsingComponent[i].GetTransform.SetParent(GetTransform());
                        m_listUsingComponent[i].GetTransform.SetAsLastSibling();
                    }
                }
            }

            if (m_listUsingRewardComponent != null && m_listUsingRewardComponent.Count > 0 && ModalHelper.IsModalExit())
            {
                for (int i = 0; i < m_listUsingRewardComponent.Count; ++i)
                {
                    {
                        m_listUsingRewardComponent[i].GetTransform.SetParent(UISystem.Instance.transform);
                        m_listUsingRewardComponent[i].GetTransform.SetAsLastSibling();
                    }
                }
                m_bNeedUpdateSibling = false;
            }
            else if (m_listUsingRewardComponent != null && m_listUsingRewardComponent.Count > 0 && m_bNeedUpdateSibling && !ModalHelper.IsModalExit())
            {
                for (int i = 0; i < m_listUsingRewardComponent.Count; ++i)
                {
                    {
                        m_listUsingRewardComponent[i].GetTransform.SetParent(GetTransform());
                        m_listUsingRewardComponent[i].GetTransform.SetAsLastSibling();
                    }
                }
            }
        }