From 8c1184fced045f133de6cc7fe55deb38e1884812 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期六, 13 四月 2019 11:30:50 +0800
Subject: [PATCH] Merge branch 'master' into HazyRegion
---
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