From a346604aa98af9f2ed0a8fb5857bdd875b860e07 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期一, 29 十月 2018 14:39:02 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/OpenServerActivity/WishingPoolWin.cs |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/System/OpenServerActivity/WishingPoolWin.cs b/System/OpenServerActivity/WishingPoolWin.cs
index 15cc397..5f42262 100644
--- a/System/OpenServerActivity/WishingPoolWin.cs
+++ b/System/OpenServerActivity/WishingPoolWin.cs
@@ -27,6 +27,8 @@
         [SerializeField] UIAlphaTween alphaTween;
         [SerializeField] List<Vector2> startPos = new List<Vector2>();
         [SerializeField] List<Vector2> endPos = new List<Vector2>();
+        [Header("鏈�灏忔椂闂撮棿闅�")] [SerializeField] int minDuration = 3;
+        [Header("鏈�澶ф椂闂撮棿闅�")] [SerializeField] int maxDuration = 6;
 
         ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
         WishingPoolModel wishingModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
@@ -105,8 +107,16 @@
             alphaTween.to = 1;
             alphaTween.SetStartState();
             handImg.gameObject.SetActive(true);
-            int offset = wishingModel.handStartIndex % 4 - wishingModel.handEndIndex;
-            positionTween.duration = Mathf.Max(2, Mathf.Abs(offset));
+            int offset = Mathf.Abs(wishingModel.handStartIndex % 4 - wishingModel.handEndIndex);
+            if(offset < minDuration)
+            {
+                offset = minDuration;
+            }
+            else if(offset > maxDuration)
+            {
+                offset = maxDuration;
+            }
+            positionTween.duration = offset;
             alphaTween.Play();
             positionTween.Play(() =>
             {
@@ -235,7 +245,7 @@
         #region 娲诲姩閫昏緫
         private void OperationEndEvent(Operation type, int state)
         {
-            if(type == Operation.WishingWellInfo && state == 1)
+            if(type == Operation.WishingWellInfo && state == 0)
             {
                 UpdateActivityState();
             }

--
Gitblit v1.8.0