Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/Resources/Holographic/Scripts/grid.cs
|
@@ -16,16 +16,16 @@ |
16 |
16 |
|
//this.transform.eulerAngles = new Vector3(0f,0f,0f); |
17 |
17 |
|
this.transform.rotation = new Quaternion(-m_cam.transform.rotation.x,-m_cam.transform.rotation.y,-m_cam.transform.rotation.z,m_cam.transform.rotation.w); |
18 |
18 |
|
|
19 |
|
- |
if (sliders.roboGui && this.renderer.material.color.a==0f){ |
20 |
|
- |
this.renderer.material.color= new Color(1,1,1,1f*a); |
|
19 |
+ |
if (sliders.roboGui && this.GetComponent<Renderer>().material.color.a==0f){ |
|
20 |
+ |
this.GetComponent<Renderer>().material.color= new Color(1,1,1,1f*a); |
21 |
21 |
|
} |
22 |
22 |
|
|
23 |
|
- |
if (!sliders.roboGui && this.renderer.material.color.a==1f*a){ |
24 |
|
- |
this.renderer.material.color= new Color(1,1,1,0f); |
|
23 |
+ |
if (!sliders.roboGui && this.GetComponent<Renderer>().material.color.a==1f*a){ |
|
24 |
+ |
this.GetComponent<Renderer>().material.color= new Color(1,1,1,0f); |
25 |
25 |
|
} |
26 |
26 |
|
if (a!=sliders.opacity &&sliders.roboGui){ |
27 |
27 |
|
a= sliders.opacity; |
28 |
|
- |
this.renderer.material.color = new Color(this.renderer.material.color.r,this.renderer.material.color.b,this.renderer.material.color.g,1f*a); |
|
28 |
+ |
this.GetComponent<Renderer>().material.color = new Color(this.GetComponent<Renderer>().material.color.r,this.GetComponent<Renderer>().material.color.b,this.GetComponent<Renderer>().material.color.g,1f*a); |
29 |
29 |
|
} |
30 |
30 |
|
} |
31 |
31 |
|
} |