Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/EasyTouch/Example/C# Example/Examples for EasyTouch/Example-TwoFinger/TwoLongTap.cs
|
@@ -36,7 +36,7 @@ |
36 |
36 |
|
void On_LongTapStart2Fingers( 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,14 +52,14 @@ |
52 |
52 |
|
void On_LongTapEnd2Fingers( Gesture gesture){ |
53 |
53 |
|
// Verification that the action on the object |
54 |
54 |
|
if (gesture.pickObject == gameObject){ |
55 |
|
- |
gameObject.renderer.material.color = new Color(1f,1f,1f); |
|
55 |
+ |
gameObject.GetComponent<Renderer>().material.color = new Color(1f,1f,1f); |
56 |
56 |
|
textMesh.text="Long tap"; |
57 |
57 |
|
} |
58 |
58 |
|
} |
59 |
59 |
|
|
60 |
60 |
|
// If the two finger gesture is finished |
61 |
61 |
|
void On_Cancel2Fingers(Gesture gesture){ |
62 |
|
- |
gameObject.renderer.material.color = new Color(1f,1f,1f); |
|
62 |
+ |
gameObject.GetComponent<Renderer>().material.color = new Color(1f,1f,1f); |
63 |
63 |
|
textMesh.text="Long tap"; |
64 |
64 |
|
} |
65 |
65 |
|
} |