From 89746ce2ee33c5430601ef1bf3b5b03325c601ad Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Fri, 27 Nov 2020 16:40:17 +0800
Subject: [PATCH] 位置修改

---
 Assets/Scripts/UI/ClickEffect.cs |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/Assets/Scripts/UI/ClickEffect.cs b/Assets/Scripts/UI/ClickEffect.cs
index b1a7353..b29cad6 100644
--- a/Assets/Scripts/UI/ClickEffect.cs
+++ b/Assets/Scripts/UI/ClickEffect.cs
@@ -45,14 +45,15 @@
     {
         if (Application.isMobilePlatform)
         {
-            for (int i = 0; i < Input.touchCount; ++i)
+            Touch touch = Input.GetTouch(0);
+            if (touch.phase == TouchPhase.Began)
             {
-                Touch touch = Input.GetTouch(i);
-                if (touch.phase == TouchPhase.Began)
-                {
-                    PlayFX(touch.position);
-                }
+                PlayFX(touch.position);
             }
+            // for (int i = 0; i < Input.touchCount; ++i)
+            // {
+
+            // }
         }
         else
         {
@@ -66,6 +67,8 @@
 
     private void PlayFX(Vector2 tapPos)
     {
+        if (Time.timeScale < 0.0001f) return;
+        
         RecycleEffectc fx = CreateFX();
 
         RectTransform fxRectTrans = fx.gameObject.GetComponent<RectTransform>();
@@ -75,7 +78,7 @@
         fxRectTrans.anchoredPosition3D = fxLocalPos;
         //fxRectTrans.localScale = Vector3.one;
         fx.gameObject.SetActive(true);
-        fx.StartPlay(fxLifeTime,RecycleFX);
+        fx.StartPlay(fxLifeTime, RecycleFX);
     }
 
 

--
Gitblit v1.9.1