Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/EasyTouch/Example/C# Example/Examples for EasyTouch/Example-TwoFinger/TwoDrag.cs
|
@@ -38,7 +38,7 @@ |
38 |
38 |
|
|
39 |
39 |
|
// Verification that the action on the object |
40 |
40 |
|
if (gesture.pickObject == gameObject){ |
41 |
|
- |
gameObject.renderer.material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f)); |
|
41 |
+ |
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f)); |
42 |
42 |
|
|
43 |
43 |
|
Vector3 position = gesture.GetTouchToWordlPoint( 5); |
44 |
44 |
|
deltaPosition = position - transform.position; |
|
@@ -66,7 +66,7 @@ |
66 |
66 |
|
// Verification that the action on the object |
67 |
67 |
|
if (gesture.pickObject == gameObject){ |
68 |
68 |
|
transform.position=new Vector3(2.5f,-0.5f,-5f); |
69 |
|
- |
gameObject.renderer.material.color = new Color(1f,1f,1f); |
|
69 |
+ |
gameObject.GetComponent<Renderer>().material.color = new Color(1f,1f,1f); |
70 |
70 |
|
textMesh.text="Drag me"; |
71 |
71 |
|
} |
72 |
72 |
|
} |
|
@@ -76,7 +76,7 @@ |
76 |
76 |
|
void On_Cancel2Fingers(Gesture gesture){ |
77 |
77 |
|
|
78 |
78 |
|
transform.position=new Vector3(2.5f,-0.5f,-5f); |
79 |
|
- |
gameObject.renderer.material.color = new Color(1f,1f,1f); |
|
79 |
+ |
gameObject.GetComponent<Renderer>().material.color = new Color(1f,1f,1f); |
80 |
80 |
|
textMesh.text="Drag me"; |
81 |
81 |
|
|
82 |
82 |
|
} |