zhaoyang 3 years ago
parent
commit
5796112baa

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographView.cs

@@ -48,7 +48,6 @@ namespace GFGGame
         private RotationGesture rotationGesture;
         private RotationGesture rotationGesture;
 
 
         private bool isTouchUI = false;//点击在m_comSelectBox按钮上
         private bool isTouchUI = false;//点击在m_comSelectBox按钮上
-        private bool isTouchTwoPoint = false;//双指操作
         private int maxLayer = int.MinValue;//最上层的层级数
         private int maxLayer = int.MinValue;//最上层的层级数
         protected override void OnInit()
         protected override void OnInit()
         {
         {
@@ -343,7 +342,7 @@ namespace GFGGame
         private void OnPinch(EventContext context)
         private void OnPinch(EventContext context)
         {
         {
             if (hitParentGameObj == null) return;
             if (hitParentGameObj == null) return;
-            isTouchTwoPoint = true;
+            if (hitParentGameObj == bgParent) return;//背景不可以缩放、旋转
 
 
             GTween.Kill(hitParentGameObj);
             GTween.Kill(hitParentGameObj);
 
 
@@ -358,7 +357,7 @@ namespace GFGGame
             if (value > MaxScale || value < MinScale) return;
             if (value > MaxScale || value < MinScale) return;
             gameObject.transform.localScale = new Vector3(value, value, value);
             gameObject.transform.localScale = new Vector3(value, value, value);
             Debug.Log("双指缩放:" + value);
             Debug.Log("双指缩放:" + value);
-
+            distance = distance * value;
             Vector2 size = SceneController.GetGameObjectSize(gameObject);
             Vector2 size = SceneController.GetGameObjectSize(gameObject);
             _ui.m_comSelectBox.target.SetSize(size.x, size.y);
             _ui.m_comSelectBox.target.SetSize(size.x, size.y);
         }
         }
@@ -367,7 +366,8 @@ namespace GFGGame
         private void OnRotate(EventContext context)
         private void OnRotate(EventContext context)
         {
         {
             if (hitParentGameObj == null) return;
             if (hitParentGameObj == null) return;
-            isTouchTwoPoint = true;
+            if (hitParentGameObj == bgParent) return;//背景不可以缩放、旋转
+
 
 
             GTween.Kill(hitParentGameObj.transform);
             GTween.Kill(hitParentGameObj.transform);