public static SetEnableTwist ( bool enable ) : void | ||
enable | bool |
/// true = enabled /// false = disabled /// |
Résultat | void |
// At the pinch end private void On_PinchEnd(Gesture gesture) { if (gesture.pickedObject == gameObject) { EasyTouch.SetEnableTwist(true); } }
// Token: 0x06000997 RID: 2455 RVA: 0x0002949E File Offset: 0x0002789E private void On_PinchEnd(Gesture gesture) { if (gesture.pickedObject == base.gameObject) { EasyTouch.SetEnableTwist(true); base.StartCoroutine(this.DelayTouchEnabled()); } }
private void On_TouchStart2Fingers(Gesture gesture) { if (gesture.pickedObject == gameObject) { EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(true); } }
// Token: 0x0600056E RID: 1390 RVA: 0x00028460 File Offset: 0x00026860 private void On_Cancel2Fingers(Gesture gesture) { if (this.trail != null) { UnityEngine.Object.Destroy(this.trail); EasyTouch.SetEnableTwist(true); EasyTouch.SetEnablePinch(true); } }
// At the 2 fingers touch beginning private void On_TouchStart2Fingers(Gesture gesture) { // Debug.Log("________________________________________On_TouchStart2Fingers"); // disable twist gesture recognize for a real pinch end EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(true); positionOnTouch2Finger = CalculateTouchPosition2Finger(gesture); // ForDebugLog(gesture); }
// At the 2 fingers touch beginning void On_TouchStart2Fingers(Gesture gesture) { // Verification that the action on the object if (gesture.pickObject == gameObject) { EasyTouch.SetEnablePinch(false); EasyTouch.SetEnableTwist(true); } }
// At the pinch end private void On_PinchEnd(Gesture gesture) { if (gesture.pickObject == gameObject) { transform.localScale = new Vector3(1.7f, 1.7f, 1.7f); EasyTouch.SetEnableTwist(true); textMesh.text = "Pinch me"; } }
// Token: 0x060001E8 RID: 488 RVA: 0x00009B78 File Offset: 0x00007F78 private void On_PinchEnd(Gesture gesture) { if (gesture.pickedObject == base.gameObject) { base.transform.localScale = new Vector3(2.5f, 2.5f, 2.5f); EasyTouch.SetEnableTwist(true); this.textMesh.text = "Pinch me"; } }
// Token: 0x06000994 RID: 2452 RVA: 0x000293C9 File Offset: 0x000277C9 private void On_TouchStart2Fingers(Gesture gesture) { if (gesture.pickedObject == base.gameObject) { EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(true); GameManager.Instance.gameTouchLayer.SetDragEnabled(false); } }
// Token: 0x0600056B RID: 1387 RVA: 0x0002832C File Offset: 0x0002672C private void On_SwipeStart2Fingers(Gesture gesture) { if (this.trail == null) { Vector3 touchToWordlPoint = gesture.GetTouchToWordlPoint(5f); this.trail = (UnityEngine.Object.Instantiate(Resources.Load("Trail"), touchToWordlPoint, Quaternion.identity) as GameObject); EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(false); } }
// At the 2 fingers touch beginning private void On_TouchStart2Fingers(Gesture gesture) { // Verification that the action on the object if (gesture.pickedObject == gameObject) { // disable twist gesture recognize for a real pinch end EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(true); } }
// If the two finger gesture is finished void On_Cancel2Fingers(Gesture gesture) { if (trail != null) { Destroy(trail); //textMesh.text = "Last swipe : cancel"; EasyTouch.SetEnableTwist(true); EasyTouch.SetEnablePinch(true); } }
// At the swipe beginning void On_SwipeStart2Fingers(Gesture gesture) { if (trail == null) // Only the first finger { Vector3 position = gesture.GetTouchToWordlPoint(5); trail = Instantiate(Resources.Load("Trail"), position, Quaternion.identity) as GameObject; // For real swipe End EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(false); } }
// At the swipe end void On_SwipeEnd2Fingers(Gesture gesture) { if (trail != null) { Destroy(trail); float angles = gesture.GetSwipeOrDragAngle(); textMesh.text = "Last swipe : " + gesture.swipe.ToString() + " / vector : " + gesture.swipeVector.normalized + " / angle : " + angles.ToString("f2"); EasyTouch.SetEnableTwist(true); EasyTouch.SetEnablePinch(true); } }
// Use this for initialization void Start() { zoomDistance = transform.position.y; tempPosition = transform.position; EasyTouch.On_SimpleTap += OnSimpleTap; EasyTouch.On_DoubleTap += OnDoubleTap; EasyTouch.On_DragStart += OnDragStart; EasyTouch.On_Drag += OnDrag; EasyTouch.On_DragEnd += OnDragEnd; EasyTouch.SetEnableTwist(false); //DebugUtils.Log( DebugUtils.Type.Map , "MapWidth:" + mapWidthLimit + "MapHeigh:" + mapHeightLimit ); }
// Token: 0x060004CE RID: 1230 RVA: 0x00025C4C File Offset: 0x0002404C private void OnGUI() { GUI.matrix = Matrix4x4.Scale(new Vector3((float)Screen.width / 1024f, (float)Screen.height / 768f, 1f)); GUI.Box(new Rect(0f, -4f, 1024f, 30f), string.Empty); GUILayout.Label("Manipulation of an image : Twist, Pinch, Drag with 1 or 2 fingers ctrl or alt key to simulate the second finger", new GUILayoutOption[0]); GUILayout.Space(15f); this.bTwist = GUILayout.Toggle(this.bTwist, "Enable Twist", new GUILayoutOption[0]); EasyTouch.SetEnableTwist(this.bTwist); GUILayout.Space(15f); this.bPinch = GUILayout.Toggle(this.bPinch, "Enable Pinch", new GUILayoutOption[0]); EasyTouch.SetEnablePinch(this.bPinch); if (GUI.Button(new Rect(412f, 700f, 200f, 50f), "Main menu")) { Application.LoadLevel("StartMenu"); } }
// Token: 0x0600056D RID: 1389 RVA: 0x000283C0 File Offset: 0x000267C0 private void On_SwipeEnd2Fingers(Gesture gesture) { if (this.trail != null) { UnityEngine.Object.Destroy(this.trail); float swipeOrDragAngle = gesture.GetSwipeOrDragAngle(); this.textMesh.text = string.Concat(new object[] { "Last swipe : ", gesture.swipe.ToString(), " / vector : ", gesture.swipeVector.normalized, " / angle : ", swipeOrDragAngle.ToString("f2") }); EasyTouch.SetEnableTwist(true); EasyTouch.SetEnablePinch(true); } }
void OnGUI() { GUI.matrix = Matrix4x4.Scale(new Vector3(Screen.width / 1024.0f, Screen.height / 768.0f, 1f)); GUI.Box(new Rect(0, -4, 1024, 30), ""); GUILayout.Label("Manipulation of an image : Twist, Pinch, Drag with 1 or 2 fingers, ctrl key to swipe and alt key to Twist and pinch to simulate the second finger"); GUILayout.Space(15); bTwist = GUILayout.Toggle(bTwist, "Enable Twist"); EasyTouch.SetEnableTwist(bTwist); GUILayout.Space(15); bPinch = GUILayout.Toggle(bPinch, "Enable Pinch"); EasyTouch.SetEnablePinch(bPinch); // Back to menu menu if (GUI.Button(new Rect(412, 700, 200, 50), "Main menu")) { Application.LoadLevel("StartMenu"); } }
private void On_TouchStart2Fingers(Gesture gesture) { EasyTouch.SetEnableTwist(false); EasyTouch.SetEnablePinch(true); }
public override void OnEnter() { EasyTouch.SetEnableTwist(enable.Value); Finish(); }
// At the pinch end private void On_PinchEnd(Gesture gesture) { EasyTouch.SetEnableTwist(true); }