Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/EasyTouch/Example/C# Example/Examples for EasyTouch/Example-OneFinger/Drag.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 |
|
// the world coordinate from touch for z=5 |
44 |
44 |
|
Vector3 position = gesture.GetTouchToWordlPoint(5); |
|
@@ -72,7 +72,7 @@ |
72 |
72 |
|
// Verification that the action on the object |
73 |
73 |
|
if (gesture.pickObject == gameObject){ |
74 |
74 |
|
transform.position= new Vector3(3f,1.8f,-5f); |
75 |
|
- |
gameObject.renderer.material.color = Color.white; |
|
75 |
+ |
gameObject.GetComponent<Renderer>().material.color = Color.white; |
76 |
76 |
|
textMesh.text="Drag me"; |
77 |
77 |
|
} |
78 |
78 |
|
} |