示例#1
0
    private void EquipComposeResponse(int nErrorCode)
    {
        if (nErrorCode == 0)
        {
            NGUIUtil.ShowTipWndByKey(30000036);
            RefreshEquipItems();
            PdbycWnd wnd1 = WndManager.FindDialog <PdbycWnd>();
            if (wnd1)
            {
                wnd1.RefreshEquipItems();
            }
            EquipmentInfoWnd wnd2 = WndManager.FindDialog <EquipmentInfoWnd>();
            if (wnd2)
            {
                wnd2.RefreshUI();
            }

            WndManager.DestoryDialog <EquipComposeWnd>();
        }

        EquipmentInfoWnd wnd = WndManager.FindDialog <EquipmentInfoWnd>();

        if (wnd)
        {
            wnd.CheckEquipExist();
            wnd.TweenReset();
        }
    }
示例#2
0
    public void BtnItem_OnClickEventHandler(UIButton sender)
    {
        EquipmentInfoWnd wnd = WndManager.GetDialog <EquipmentInfoWnd>();

        if (wnd == null)
        {
            return;
        }

        if (m_equipmentPutType == EquipmentPutType.CanPut)
        {
            if (bGuideSelect)
            {
                wnd.BGuideSelect = true;
            }
            wnd.SetData(m_itemTypeID, m_iItemID, m_soldierInfo, m_iPosIndex, 3);
        }
        else if (m_equipmentPutType == EquipmentPutType.HaveCannot)
        {
            wnd.SetData(m_itemTypeID, 0, m_soldierInfo, m_iPosIndex, 1);
        }

        else if (m_equipmentPutType == EquipmentPutType.CanCombine)
        {
            wnd.SetData(m_itemTypeID, 0, m_soldierInfo, m_iPosIndex, 2);
        }

        else if (m_equipmentPutType == EquipmentPutType.NoCanCombine)
        {
            wnd.SetData(m_itemTypeID, 0, m_soldierInfo, m_iPosIndex, 5);
        }

        else if (m_equipmentPutType == EquipmentPutType.HavePut)
        {
            wnd.SetData(m_itemTypeID, 0, m_soldierInfo, m_iPosIndex, 1);
        }
        else if (m_equipmentPutType == EquipmentPutType.ReadyCombine)
        {
            wnd.SetData(m_itemTypeID, 0, m_soldierInfo, m_iPosIndex, 2);
        }
        else
        {
            wnd.SetData(m_itemTypeID, 0, m_soldierInfo, m_iPosIndex, 2);
        }
    }
示例#3
0
    /// <summary>
    /// 穿装备后飘出增加的属性 文本
    /// </summary>
    private void ShowPutEquipEffect()
    {
        EquipmentInfoWnd wnd = WndManager.FindDialog <EquipmentInfoWnd>();

        if (wnd)
        {
            Dictionary <int, int> equipAddAttrs = wnd.GetEquipAddAttr();
            int count = 0;
            foreach (var item in equipAddAttrs)
            {
                string text = string.Format("99800{0:000}", item.Key);
                text = NGUIUtil.GetLocalizationStr(text);
                if (text != "")
                {
                    string value = item.Value.ToString();
                    NGUIUtil.AddHudTextShow(gameObject, MyHead.HudText, text + "+" + value, Color.green, count == 0 ? 0f : 0.8f);
                    count++;
                }
            }
        }
    }