Exemplo n.º 1
0
    private void ClearHighlitObjs()
    {
        List <GameObject> list = new List <GameObject>();

        list.AddRange(NewbieGuideBaseScript.ms_highlitGo);
        list.AddRange(NewbieGuideBaseScript.ms_highlighter);
        List <GameObject> .Enumerator enumerator = list.GetEnumerator();
        while (enumerator.MoveNext())
        {
            GameObject current = enumerator.get_Current();
            if (!(current == null))
            {
                CUICommonSystem.DestoryObj(current, 0.1f);
            }
        }
        NewbieGuideBaseScript.ms_highlitGo.Clear();
        NewbieGuideBaseScript.ms_highlighter.Clear();
        int count = NewbieGuideBaseScript.ms_guideTextList.get_Count();

        for (int i = 0; i < count; i++)
        {
            GameObject gameObject = NewbieGuideBaseScript.ms_guideTextList.get_Item(i);
            if (gameObject != null)
            {
                gameObject.CustomSetActive(false);
            }
        }
        NewbieGuideBaseScript.ms_guideTextList.Clear();
    }
        public override void Close()
        {
            base.Close();
            int i = 0;

            while (i < this.m_3DGameObjects.Count)
            {
                if (!this.m_3DGameObjects[i].m_protogenic)
                {
                    if (this.m_3DGameObjects[i].m_gameObject != null)
                    {
                        if (this.m_3DGameObjects[i].m_useGameObjectPool)
                        {
                            Singleton <CGameObjectPool> .GetInstance().RecycleGameObject(this.m_3DGameObjects[i].m_gameObject);
                        }
                        else
                        {
                            CUICommonSystem.DestoryObj(this.m_3DGameObjects[i].m_gameObject, 0.1f);
                        }
                    }
                    this.m_3DGameObjects[i].m_path       = null;
                    this.m_3DGameObjects[i].m_gameObject = null;
                    this.m_3DGameObjects.RemoveAt(i);
                }
                else
                {
                    i++;
                }
            }
        }
        public void RemoveGameObject(GameObject removeObj)
        {
            if (removeObj == null)
            {
                return;
            }
            int i = 0;

            while (i < this.m_3DGameObjects.Count)
            {
                if (this.m_3DGameObjects[i].m_gameObject == removeObj)
                {
                    if (this.m_3DGameObjects[i].m_useGameObjectPool)
                    {
                        Singleton <CGameObjectPool> .GetInstance().RecycleGameObject(this.m_3DGameObjects[i].m_gameObject);
                    }
                    else
                    {
                        CUICommonSystem.DestoryObj(this.m_3DGameObjects[i].m_gameObject, 0.1f);
                    }
                    this.m_3DGameObjects.RemoveAt(i);
                }
                else
                {
                    i++;
                }
            }
            if (this.m_3DGameObjects.Count <= 0)
            {
                this.m_renderCamera.enabled = false;
            }
        }
        public void RemoveGameObject(string path)
        {
            int i = 0;

            while (i < this.m_3DGameObjects.Count)
            {
                if (string.Equals(this.m_3DGameObjects[i].m_path, path, 5))
                {
                    if (this.m_3DGameObjects[i].m_useGameObjectPool)
                    {
                        Singleton <CGameObjectPool> .GetInstance().RecycleGameObject(this.m_3DGameObjects[i].m_gameObject);
                    }
                    else
                    {
                        CUICommonSystem.DestoryObj(this.m_3DGameObjects[i].m_gameObject, 0.1f);
                    }
                    this.m_3DGameObjects.RemoveAt(i);
                }
                else
                {
                    i++;
                }
            }
            if (this.m_3DGameObjects.Count <= 0)
            {
                this.m_renderCamera.enabled = false;
            }
        }
 public override void Clear()
 {
     base.view.activity.OnTimeStateChange -= new Activity.ActivityEvent(this.OnStateChange);
     base.view.activity.OnMaskStateChange -= new Activity.ActivityEvent(this.OnStateChange);
     if (this._cursorArray != null)
     {
         for (int i = 1; i < this._cursorArray.Length; i++)
         {
             CUICommonSystem.DestoryObj(this._cursorArray[i].root, 0.1f);
         }
         this._cursorArray = null;
     }
 }
Exemplo n.º 6
0
    private void RemoveEffect(uint weakGuideId)
    {
        GameObject gameObject = null;

        if (this.mEffectCache.TryGetValue(weakGuideId, out gameObject))
        {
            this.mEffectCache.Remove(weakGuideId);
            if (gameObject != null)
            {
                CUICommonSystem.DestoryObj(gameObject, 0.1f);
            }
            this.guideImpl.ClearEffectText();
        }
    }
        public void HighliterForActorClickHandler(CUIEvent uiEvt)
        {
            GameObject srcWidget = uiEvt.m_srcWidget;

            Singleton <CBattleGuideManager> .GetInstance().ResumeGame(srcWidget);

            CUIFormScript formGuideMask = NewbieGuideScriptControl.FormGuideMask;
            Vector2       screenPos     = CUIUtility.WorldToScreenPoint(formGuideMask.GetCamera(), srcWidget.transform.position);

            Singleton <LockModeScreenSelector> .GetInstance().OnClickBattleScene(screenPos);

            CUICommonSystem.DestoryObj(srcWidget, 0.1f);
            NewbieGuideScriptControl.CloseGuideForm();
        }
        public override void Clear()
        {
            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Activity_ClickGet, new CUIEventManager.OnUIEventHandler(this.OnClickGet));

            for (int i = 0; i < this._rewardList.Count; i++)
            {
                this._rewardList[i].Clear();
                if (i > 0)
                {
                    CUICommonSystem.DestoryObj(this._rewardList[i].root, 0.1f);
                }
            }
            this._rewardList  = null;
            this._elementTmpl = null;
        }
Exemplo n.º 9
0
        public override void Clear()
        {
            base.view.activity.OnTimeStateChange -= new Activity.ActivityEvent(this.OnStateChange);
            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Activity_ClickGoto, new CUIEventManager.OnUIEventHandler(this.OnClickGoto));

            for (int i = 0; i < this._elementList.Count; i++)
            {
                this._elementList[i].Clear();
                if (i > 0)
                {
                    CUICommonSystem.DestoryObj(this._elementList[i].root, 0.1f);
                }
            }
            this._elementList = null;
            this._elementTmpl = null;
        }
Exemplo n.º 10
0
 public static void DestoryAllChild(GameObject node)
 {
     if (node == null)
     {
         return;
     }
     while (node.transform.childCount > 0)
     {
         Transform child = node.transform.GetChild(0);
         if (child == null || child.gameObject == null)
         {
             return;
         }
         CUICommonSystem.DestoryObj(child.gameObject, 0f);
     }
 }
 public static void DelRedDot(GameObject target)
 {
     if (target == null || target.transform == null)
     {
         return;
     }
     CUIMiniEventScript[] componentsInChildren = target.transform.GetComponentsInChildren <CUIMiniEventScript>(true);
     for (int i = 0; i < componentsInChildren.Length; i++)
     {
         if (componentsInChildren[i].m_onDownEventID == enUIEventID.Common_RedDotParsEvent && componentsInChildren[i].m_onDownEventParams.tag == 0)
         {
             componentsInChildren[i].m_onDownEventParams.tag = 1;
             componentsInChildren[i].gameObject.CustomSetActive(false);
             CUICommonSystem.DestoryObj(componentsInChildren[i].gameObject, 0.1f);
         }
     }
 }
        public override void Clear()
        {
            base.view.activity.OnTimeStateChange -= new Activity.ActivityEvent(this.OnStateChange);
            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Activity_PtExchange, new CUIEventManager.OnUIEventHandler(this.OnClickExchange));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Activity_PtExchangeConfirm, new CUIEventManager.OnUIEventHandler(this.OnClickExchangeConfirm));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Activity_PtExchangeCountReady, new CUIEventManager.OnUIEventHandler(this.OnClickExchangeCountSelectReady));

            Singleton <CUIEventManager> .GetInstance().RemoveUIEventListener(enUIEventID.Activity_ExchangeHeroSkinConfirm, new CUIEventManager.OnUIEventHandler(this.OnExchangeHeroSkinConfirm));

            if (this._elementList != null)
            {
                for (int i = 0; i < this._elementList.Count; i++)
                {
                    if (this._elementList[i].uiItem)
                    {
                        CUICommonSystem.DestoryObj(this._elementList[i].uiItem, 0.1f);
                    }
                }
                this._elementList = null;
            }
            this._elementTmpl = null;
        }