Exemple #1
0
        /// <summary>
        /// Remove UiControllerScript
        /// </summary>
        /// <param name="identifier">identifier</param>
        /// <param name="uiController">UiControllerScript</param>
        // -------------------------------------------------------------------------------------
        public void removeUiControllerScript(string identifier, UiControllerScript uiController)
        {
            if (!this.addNewUiListAndDefaultSelectable(identifier))
            {
                return;
            }

            // --------------

            if (this.m_uiDictionary.ContainsKey(identifier) && uiController)
            {
                if (this.m_uiDictionary[identifier].uiList.Contains(uiController))
                {
                    this.m_uiDictionary[identifier].uiList.Remove(uiController);

                    if (this.m_uiDictionary[identifier].uiList.Count <= 0 && !this.m_uiDictionary[identifier].sendPauseSignal)
                    {
                        this.m_uiDictionary.Remove(identifier);
                    }

#if UNITY_EDITOR
                    if (this.m_updateUiGroupForDebug)
                    {
                        this.m_uiGroups = new List <UiListAndDefaultSelectable>(this.m_uiDictionary.Values);
                    }
#endif
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// Add UiControllerScript
        /// </summary>
        /// <param name="identifier">identifier</param>
        /// <param name="uiController">UiControllerScript</param>
        // -------------------------------------------------------------------------------------
        public void addUiControllerScript(string identifier, UiControllerScript uiController)
        {
            if (!this.addNewUiListAndDefaultSelectable(identifier))
            {
                return;
            }

            // --------------

            // if (this.m_uiDictionary.ContainsKey(identifier))
            {
                if (!this.m_uiDictionary[identifier].uiList.Contains(uiController))
                {
                    this.m_uiDictionary[identifier].uiList.Add(uiController);


#if UNITY_EDITOR
                    if (this.m_updateUiGroupForDebug)
                    {
                        this.m_uiGroups = new List <UiListAndDefaultSelectable>(this.m_uiDictionary.Values);
                    }
#endif
                }
            }
        }