From 5c6d49f48e70fd37919e948468a1c24d5aa2990e Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期五, 12 四月 2019 21:09:24 +0800
Subject: [PATCH] 6498 【前端】【2.0】主界面技能转盘修改

---
 System/MainInterfacePanel/LongPressShowPanel.cs |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/System/MainInterfacePanel/LongPressShowPanel.cs b/System/MainInterfacePanel/LongPressShowPanel.cs
index fbb732b..7442419 100644
--- a/System/MainInterfacePanel/LongPressShowPanel.cs
+++ b/System/MainInterfacePanel/LongPressShowPanel.cs
@@ -6,13 +6,42 @@
 using System.Collections;
 using UnityEngine.UI;
 //鎶�鑳借鎯呴潰鏉�
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
 
-    public class LongPressShowPanel:MonoBehaviour {
+    public class LongPressShowPanel : MonoBehaviour
+    {
         public Image m_Icon;
         public Text Name;
         public Text Describe;
 
+        public void Display(int skillId)
+        {
+            var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
+            var treasures = treasureModel.GetAllTreasure();
+            var treasureId = 0;
+
+            for (int i = 0; i < treasures.Count; i++)
+            {
+                Treasure treasure;
+                if (treasureModel.TryGetTreasure(treasures[i], out treasure))
+                {
+                    if (treasure.skillId == skillId)
+                    {
+                        treasureId = treasure.id;
+                        break;
+                    }
+                }
+            }
+
+
+            var skillConfig = SkillConfig.Get(skillId);
+            Name.text = skillConfig.SkillName;
+            Describe.text = skillConfig.Description;
+
+            var treasureConfig = TreasureConfig.Get(treasureId);
+            m_Icon.SetSprite(treasureConfig.Icon);
+        }
 
     }
 

--
Gitblit v1.8.0