Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/EasyTouch/Example/C# Example/Examples for EasyTouch/Example-TwoFinger/TwoTouchStart.cs
|
@@ -36,7 +36,7 @@ |
36 |
36 |
|
void On_TouchStart2Fingers( Gesture gesture){ |
37 |
37 |
|
// Verification that the action on the object |
38 |
38 |
|
if (gesture.pickObject == gameObject){ |
39 |
|
- |
gameObject.renderer.material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f)); |
|
39 |
+ |
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)); |
40 |
40 |
|
} |
41 |
41 |
|
} |
42 |
42 |
|
|
|
@@ -52,7 +52,7 @@ |
52 |
52 |
|
|
53 |
53 |
|
// Verification that the action on the object |
54 |
54 |
|
if (gesture.pickObject == gameObject){ |
55 |
|
- |
gameObject.renderer.material.color = Color.white; |
|
55 |
+ |
gameObject.GetComponent<Renderer>().material.color = Color.white; |
56 |
56 |
|
textMesh.text ="Touch Start/Up"; |
57 |
57 |
|
} |
58 |
58 |
|
} |
|
@@ -61,7 +61,7 @@ |
61 |
61 |
|
|
62 |
62 |
|
// Verification that the action on the object |
63 |
63 |
|
if (gesture.pickObject == gameObject){ |
64 |
|
- |
gameObject.renderer.material.color = Color.white; |
|
64 |
+ |
gameObject.GetComponent<Renderer>().material.color = Color.white; |
65 |
65 |
|
textMesh.text ="Touch Start/Up"; |
66 |
66 |
|
} |
67 |
67 |
|
} |