Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/EasyTouch/Example/C# Example/Examples for EasyTouch/Example-Multiplefingers/ScreenTouch.cs
|
@@ -60,16 +60,16 @@ |
60 |
60 |
|
break; |
61 |
61 |
|
|
62 |
62 |
|
} |
63 |
|
- |
sphere.renderer.material.SetColor ("_TintColor", color); |
64 |
|
- |
spot.renderer.material.SetColor ("_TintColor",color); |
|
63 |
+ |
sphere.GetComponent<Renderer>().material.SetColor ("_TintColor", color); |
|
64 |
+ |
spot.GetComponent<Renderer>().material.SetColor ("_TintColor",color); |
65 |
65 |
|
|
66 |
66 |
|
// assign the layer for auto detection |
67 |
67 |
|
sphere.layer=8; |
68 |
68 |
|
|
69 |
69 |
|
// Add a script to react with the touchs |
70 |
|
- |
sphere.AddComponent("ObjectTouch"); |
|
70 |
+ |
sphere.AddComponent<ObjectTouch>(); |
71 |
71 |
|
|
72 |
|
- |
sphere.rigidbody.mass = size; |
|
72 |
+ |
sphere.GetComponent<Rigidbody>().mass = size; |
73 |
73 |
|
} |
74 |
74 |
|
} |
75 |
75 |
|
|