private void AfterMoveBack() { Debug.Log("AfterMoveBack"); CustomTBOrbit ct = surroundCamera.GetComponent <CustomTBOrbit>(); if (ct != null) { ct.enabled = true; } if (afterMoveBack != null) { afterMoveBack(); } }
public void MoveAway() { CustomTBOrbit ct = surroundCamera.GetComponent <CustomTBOrbit>(); if (ct != null) { ct.enabled = false; } TweenPosition tp = UITweener.Begin <TweenPosition>(surroundCamera, 1.0f); Vector3 pos = surroundCamera.transform.localPosition; tp.from = pos; tp.to = pos + surroundCamera.transform.right * offset; tp.onFinished.Clear(); EventDelegate.Add(tp.onFinished, AfterMoveAway); tp.PlayForward(); if (beforeMoveAway != null) { beforeMoveAway(); } }
private void SwitchFingerGesture(bool sw) { GameObject gesture = GameObject.FindGameObjectWithTag(Config.TAG_GESTURE); if (gesture != null) { TapRecognizer tr = gesture.GetComponent <TapRecognizer>(); if (tr != null) { tr.UseSendMessage = sw; } LongPressRecognizer lpr = gesture.GetComponent <LongPressRecognizer>(); if (lpr != null) { lpr.UseSendMessage = sw; } } GameObject mainCamera = GameObject.FindGameObjectWithTag(Config.TAG_MAIN_CAMERA); if (mainCamera != null) { CustomTBOrbit ct = mainCamera.GetComponent <CustomTBOrbit>(); if (ct != null) { ct.enabled = sw; } DragRecognizer dr = mainCamera.GetComponent <DragRecognizer>(); if (dr != null) { dr.UseSendMessage = sw; } PinchRecognizer pr = mainCamera.GetComponent <PinchRecognizer>(); if (pr != null) { pr.UseSendMessage = sw; } } }