File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
JCSUnity/Scripts/GameObject/2D/2DCamera
Resources/JCSUnity_Resources/Camera Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public class JCS_2DSlideScreenCamera
6666
6767 [ Tooltip ( "Area space to swipe for previous/next page." ) ]
6868 [ SerializeField ]
69- private Vector2 mSwipeArea = new Vector2 ( 0.5f , 0.5f ) ;
69+ private Vector2 mSwipeArea = new Vector2 ( 0.3f , 0.3f ) ;
7070
7171 [ Tooltip ( "Freeze the x axis sliding action." ) ]
7272 [ SerializeField ]
@@ -352,8 +352,6 @@ private void DoMobileSwipe()
352352
353353 if ( ! mFreezeX && posDiff . x > target_vs . width )
354354 {
355- print ( posDiff ) ;
356-
357355 if ( JCS_Mathf . IsPositive ( si . DragDisplacement . x ) )
358356 SwitchScene ( JCS_2D4Direction . LEFT ) ;
359357 else
@@ -394,6 +392,8 @@ private Vector2 GetScreenSize()
394392 JCS_Camera cam = JCS_Camera . main ;
395393
396394 JCS_PanelRoot panelRoot = mPanelHolder . slidePanels [ 0 ] . GetComponent < JCS_PanelRoot > ( ) ;
395+ if ( panelRoot == null )
396+ panelRoot = mPanelHolder . slidePanels [ 0 ] . GetComponentInParent < JCS_PanelRoot > ( ) ;
397397
398398 switch ( mUnityGUIType )
399399 {
Original file line number Diff line number Diff line change @@ -65,9 +65,7 @@ MonoBehaviour:
6565 mUnityGUIType : 1
6666 mJCS_2DCamera : {fileID: 0}
6767 mPanelHolder : {fileID: 0}
68- mSwipeStickiness : 100
69- mSwipeDistanceX : 5
70- mSwipeDistanceY : 5
68+ mSwipeArea : {x: 0.3, y: 0.3}
7169 mFreezeX : 0
7270 mFreezeY : 0
7371 mSwitchSceneSound : {fileID: 0}
You can’t perform that action at this time.
0 commit comments