public void FinishDragProcess() { // Debug.Log("dragged end called with " + dragTapable); dragTapable = null; dragTransform = null; FingerState = EFingersState.NONE; }
void Awake() { Instance = this; // Debug.Log("ClickAndDragController.FingerState : " + ClickAndDragController.FingerState); ClickAndDragController.FingerState = EFingersState.NONE; }
public void ActivateScreen() { ClickAndDragController.FingerState = EFingersState.NONE; }
public void BlockScreen() { // Debug.Log("over"); ClickAndDragController.FingerState = EFingersState.LOCKED; }
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; } } } }