少年修仙传客户端代码仓库
client_linchunjie
2019-04-17 6d101512ba4cb8e37a98ace6320a0b70c96efa2b
System/ItemTip/TipModelWidget.cs
@@ -13,7 +13,6 @@
    public class TipModelWidget : MonoBehaviour
    {
        [SerializeField] Text m_Title;
        [SerializeField] RawImage m_Model;
        [SerializeField] Text m_FightPower;
        [SerializeField] Image m_Fight;
@@ -22,36 +21,35 @@
        FashionDressModel fashionDressModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        public void OnDisable()
        void OnDisable()
        {
            switch (showType)
            {
                case ModelShowType.treasure:
                    UI3DTreasureExhibition.Instance.StopShow();
                case ModelShowType.Treasure:
                    UI3DTreasureExhibition.Instance.Stop();
                    break;
                case ModelShowType.mount:
                case ModelShowType.Mount:
                    break;
                case ModelShowType.pet:
                case ModelShowType.Pet:
                    break;
            }
        }
        public void Display(int id, ModelShowType showType, string title, int fightValue = 0)
        public void Display(int id, ModelShowType showType, int fightValue = 0)
        {
            m_Title.text = title;
            this.showType = showType;
            switch (showType)
            {
                case ModelShowType.treasure:
                case ModelShowType.Treasure:
                    m_Fight.SetSprite("FightingLv_Normal");
                    UI3DTreasureExhibition.Instance.BeginShowTreasure(id, m_Model);
                    UI3DTreasureExhibition.Instance.ShowTreasure(id, m_Model);
                    break;
                case ModelShowType.mount:
                case ModelShowType.Mount:
                    m_Fight.SetSprite("FightingLv_Max");
                    UI3DModelExhibition.Instance.ShowHourse(id, m_Model);
                    break;
                case ModelShowType.pet:
                case ModelShowType.Pet:
                    m_Fight.SetSprite("FightingLv_Max");
                    var npcConfig = NPCConfig.Get(id);
                    UI3DModelExhibition.Instance.ShowNPC(id, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, m_Model);
@@ -61,9 +59,9 @@
                    var itemConfig = ItemConfig.Get(id);
                    if (itemConfig != null)
                    {
                        int fashionType = 0;
                        int fashionId = 0;
                        bool isFashion = tipsModel.TryGetItemFashionData(itemConfig.ID, out fashionType, out fashionId);
                        var fashionType = 0;
                        var fashionId = 0;
                        var isFashion = tipsModel.TryGetItemFashionData(itemConfig.ID, out fashionType, out fashionId);
                        if (isFashion)
                        {
                            List<int> fashionIds = null;
@@ -130,6 +128,7 @@
                fashionSecondaryId = fashionSecondaryId,
                isDialogue = false,
            };
            return data;
        }