示例#1
0
 public void RightClick()
 {
     if (EffectController != null)
     {
         //EffectController.ClearEffect();
         GameObject go = null;
         if (EffectGODic.TryGetValue(m_ShowBelleNum, out go))
         {
             if (go != null && m_ShowBelleNum < (AllBelleFightShow.Count - 1))
             {
                 go.SetActive(false);
             }
         }
         if (m_ShowBelleNum < (AllBelleFightShow.Count - 1))
         {
             ++m_ShowBelleNum;
             if (BattleNum != null && AllBelleFightShow.Count > m_ShowBelleNum && AllBelleFightShow[m_ShowBelleNum] != null)
             {
                 BattleNum.text = AllBelleFightShow[m_ShowBelleNum].CombatForce.ToString();
             }
             if (EffectGODic.TryGetValue(m_ShowBelleNum, out go))
             {
                 if (go != null)
                 {
                     go.SetActive(true);
                     return;
                 }
             }
             if (AllBelleFightShow.Count > m_ShowBelleNum && AllBelleFightShow[m_ShowBelleNum] != null)
             {
                 EffectController.PlayEffect(AllBelleFightShow[m_ShowBelleNum].EffectId, PlayEffectOver);
             }
         }
     }
 }
示例#2
0
 private void PlayEffectOver(GameObject effectObj, object param)
 {
     if (effectObj != null && effectObj.transform.parent != null)
     {
         if (!EffectGODic.ContainsKey(m_ShowBelleNum))
         {
             EffectGODic.Add(m_ShowBelleNum, effectObj.transform.parent.gameObject);
         }
     }
     Transform[] tfs = effectObj.GetComponentsInChildren <Transform>();
     if (tfs != null && tfs.Length > 0)
     {
         foreach (Transform tf in tfs)
         {
             if (tf != null)
             {
                 tf.gameObject.layer = LayerMask.NameToLayer("TipTop");
             }
         }
     }
 }