Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/EasyTouch/Example/C# Example/Examples for EasyTouch/Example-OneFinger/TouchStart.cs
|
@@ -35,7 +35,7 @@ |
35 |
35 |
|
|
36 |
36 |
|
// Verification that the action on the object |
37 |
37 |
|
if (gesture.pickObject == gameObject) |
38 |
|
- |
gameObject.renderer.material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f)); |
|
38 |
+ |
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)); |
39 |
39 |
|
} |
40 |
40 |
|
|
41 |
41 |
|
// During the touch is down |
|
@@ -51,7 +51,7 @@ |
51 |
51 |
|
|
52 |
52 |
|
// Verification that the action on the object |
53 |
53 |
|
if (gesture.pickObject == gameObject){ |
54 |
|
- |
gameObject.renderer.material.color = new Color( 1f,1f,1f); |
|
54 |
+ |
gameObject.GetComponent<Renderer>().material.color = new Color( 1f,1f,1f); |
55 |
55 |
|
textMesh.text ="Touch Start/Up"; |
56 |
56 |
|
} |
57 |
57 |
|
} |