コード例 #1
0
 public void FinishDragProcess()
 {
     //		Debug.Log("dragged end called with " + dragTapable);
     dragTapable = null;
     dragTransform = null;
     FingerState = EFingersState.NONE;
 }
コード例 #2
0
 void Awake()
 {
     Instance = this;
     //		Debug.Log("ClickAndDragController.FingerState : " + ClickAndDragController.FingerState);
     ClickAndDragController.FingerState = EFingersState.NONE;
 }
コード例 #3
0
 public void ActivateScreen()
 {
     ClickAndDragController.FingerState = EFingersState.NONE;
 }
コード例 #4
0
 public void BlockScreen()
 {
     //		Debug.Log("over");
     ClickAndDragController.FingerState = EFingersState.LOCKED;
 }
コード例 #5
0
 void OnFingerDragBegin(int fingerIndex, Vector2 fingerPos, Vector2 startPos)
 {
     ScreenActiveMode();
     var currSceneState = SceneAnimationController.Instance.currentSceneState;
     if(currSceneState == sceneState.otherAnim || currSceneState == sceneState.transission) return;
     if (FingerState == EFingersState.NONE)
     {
         if (Physics.Raycast(rayCam.ScreenPointToRay(fingerPos), out hit, 1000.0f, DragableMask))
         {
             dragTapable = hit.transform.GetComponent<SpritePropsBehaviour>();
             if (dragTapable != null)
             {
                 this.gameObject.GetComponent<SwipingObject>().enabled = false;
                 dragTapable.OnStartDrag();
                 dragTransform = hit.transform;
                 if(dragTransform.GetComponent<DraggableInfo>())
                     dragTransform.localScale *= dragTransform.GetComponent<DraggableInfo>().scaleCoeff;
                 dragPlane = new Plane(Vector3.forward, dragTransform.position);
                 FingerState = EFingersState.DRAG;
             }
         }
      }
 }