| | |
| | | public class TipModelWidget : MonoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Text m_Title; |
| | | [SerializeField] RawImage m_Model; |
| | | [SerializeField] Text m_FightPower; |
| | | [SerializeField] Image m_Fight; |
| | |
| | | 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); |
| | |
| | | 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; |
| | |
| | | fashionSecondaryId = fashionSecondaryId, |
| | | isDialogue = false, |
| | | }; |
| | | |
| | | return data; |
| | | } |
| | | |