Esempio n. 1
0
    void NicknameAndMoney(bool vis)
    {
        if (m_RootWindow != null)
        {
            UnityEngine.Transform tf = m_RootWindow.transform.Find("DynamicWidget");
            if (tf != null)
            {
                NGUITools.SetActive(tf.gameObject, vis);
            }

            /*tf = m_RootWindow.transform.Find("PveFightInfo(Clone)");
             * if (tf != null) {
             * NGUITools.SetActive(tf.gameObject, vis);
             * }
             */
            UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("FightUI");
            if (go != null)
            {
                PveFightInfo pfi = go.GetComponent <PveFightInfo>();
                if (pfi != null)
                {
                    pfi.SetActive(vis);
                }
            }
            tf = m_RootWindow.transform.Find("ScreenScrollTip");
            if (tf != null)
            {
                NGUITools.SetActive(tf.gameObject, vis);
            }
        }
    }
Esempio n. 2
0
 public void HeroRelive()
 {
     ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole;
     if (ri != null)
     {
         int reliveStoneId                = ArkCrossEngine.ItemConfigProvider.Instance.GetReliveStoneId();
         int reliveStoneCount             = 0;
         ArkCrossEngine.ItemDataInfo item = ri.GetItemData(reliveStoneId, 0);
         if (null != item)
         {
             reliveStoneCount = item.ItemNum;
         }
         if (ri.Gold < 50 && reliveStoneCount <= 0)
         {
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui",
                                                                   ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(149), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false);
         }
         else
         {
             UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("FightUI");
             if (go != null)
             {
                 PveFightInfo pfi = go.GetComponent <PveFightInfo>();
                 if (pfi != null)
                 {
                     pfi.AboutHeroDead();
                 }
             }
             time = 0.0f;
             ArkCrossEngine.GfxSystem.EventChannelForLogic.Publish("ge_request_relive", "lobby", true);
             ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_ui_connect_hint", "ui", true, true);
         }
     }
 }