From a8aaf25139e25e2a52b42a48b815bd37f73a06f7 Mon Sep 17 00:00:00 2001
From: Client_PangDeRong <593317293@qq.com>
Date: 星期五, 19 十月 2018 15:20:31 +0800
Subject: [PATCH] 4232 【前端】许愿池功能开发

---
 System/OpenServerActivity/PoolItemCell.cs |   27 ++++++++++++---------------
 1 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/System/OpenServerActivity/PoolItemCell.cs b/System/OpenServerActivity/PoolItemCell.cs
index 27f33de..108079f 100644
--- a/System/OpenServerActivity/PoolItemCell.cs
+++ b/System/OpenServerActivity/PoolItemCell.cs
@@ -4,39 +4,36 @@
 
 namespace Snxxz.UI
 {
-    public class PoolItemCell : MonoBehaviour,IDragHandler,IDropHandler
+    public class PoolItemCell : MonoBehaviour,IDragHandler
     {
         [SerializeField] CommonItemBaisc itemBaisc;
         [SerializeField] GameObject bestIconObj;
         
         ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
         WishingPoolModel wishingModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
-        int itemId = 0;
+        int index = -1;
+
         public void OnDrag(PointerEventData eventData)
         {
-            Debug.Log("鎷栨嫿寮�濮�");
             wishingModel.isDraging = true;
-            wishingModel.dragItemId = itemId;
+            wishingModel.dragIndex = index;
         }
-
-        public void OnDrop(PointerEventData eventData)
+      
+        public void Display(int index)
         {
-            Debug.Log("鎷栨嫿缁撴潫");
-            wishingModel.ResetDragData();
-        }
-
-        public void Display(int itemId)
-        {
-            this.itemId = itemId;
+            this.index = index;
+            int id = 0;
+            bool isPoolData = wishingModel.TryGetPoolDataByIndex(index,out id);
             bestIconObj.SetActive(false);
-            ItemCellModel cellModel = new ItemCellModel(itemId);
+            ItemCellModel cellModel = new ItemCellModel(id);
             itemBaisc.Init(cellModel);
             itemBaisc.cellBtn.RemoveAllListeners();
             itemBaisc.cellBtn.AddListener(()=>
             {
-                ItemAttrData attrData = new ItemAttrData(itemId);
+                ItemAttrData attrData = new ItemAttrData(id);
                 tipsModel.SetItemTipsModel(attrData);
             });
         }
+
     }
 }

--
Gitblit v1.8.0