예제 #1
0
파일: ShopPanel.cs 프로젝트: zuojiashun/src
    private void UpdateOwer()
    {
        MallDefine.MallLocalData current = CurrentMallData;
        string costIconName = "";
        int    ownerNum     = 0;

        if (null != current)
        {
            costIconName = MallDefine.GetCurrencyIconNameByType((GameCmd.MoneyType)current.LocalMall.moneyType);
            ownerNum     = UIPlayerProprty.GetNum((ClientMoneyType)current.LocalMall.moneyType);
        }
        if (null != m_sprite_CostIcon)
        {
            UIManager.GetAtlasAsyn(costIconName,
                                   ref m_ownIconCASD, () =>
            {
                if (null != m_sprite_OwnIcon)
                {
                    m_sprite_OwnIcon.atlas = null;
                }
            }
                                   , m_sprite_OwnIcon, false);
        }

        if (null != m_label_OwnNum)
        {
            m_label_OwnNum.text = TextManager.GetFormatNumText((uint)ownerNum);
        }
    }
예제 #2
0
    void ShowPropety(List <int> lstPlayerPropety)
    {
        for (int k = 0; k < m_lstUIPlayerProprty.Count; k++)
        {
            m_lstUIPlayerProprty[k].gameObject.SetActive(false);
        }

        UIPlayerProprty prop = null;

        for (int i = 0; i < lstPlayerPropety.Count; ++i)
        {
            if (i >= m_lstUIPlayerProprty.Count)
            {
                GameObject go = NGUITools.AddChild(m_trans_currencyarea.gameObject, m_goPropetyPrefab);
                if (go == null)
                {
                    continue;
                }
                prop = go.AddComponent <UIPlayerProprty>();
                m_lstUIPlayerProprty.Add(prop);
            }
            else
            {
                prop = m_lstUIPlayerProprty[i];
            }

            if (prop != null)
            {
                prop.gameObject.SetActive(true);
                prop.Init(lstPlayerPropety[i]);
                prop.transform.localPosition = new UnityEngine.Vector3(-i * 181, 0, 0);
            }
        }
    }