Nextrek
Diff Revisions
167
vs
168
for /3DSpace/Assets/Resources/Holographic/Scripts/roboGui.cs
|
@@ -10,16 +10,16 @@ |
10 |
10 |
|
|
11 |
11 |
|
// Update is called once per frame |
12 |
12 |
|
void Update () { |
13 |
|
- |
if (sliders.roboGui && this.renderer.material.color.a==0f){ |
14 |
|
- |
this.renderer.material.color= new Color(1,1,1,1f*a); |
|
13 |
+ |
if (sliders.roboGui && this.GetComponent<Renderer>().material.color.a==0f){ |
|
14 |
+ |
this.GetComponent<Renderer>().material.color= new Color(1,1,1,1f*a); |
15 |
15 |
|
} |
16 |
16 |
|
|
17 |
|
- |
if (!sliders.roboGui && this.renderer.material.color.a==1f*a){ |
18 |
|
- |
this.renderer.material.color= new Color(1,1,1,0f); |
|
17 |
+ |
if (!sliders.roboGui && this.GetComponent<Renderer>().material.color.a==1f*a){ |
|
18 |
+ |
this.GetComponent<Renderer>().material.color= new Color(1,1,1,0f); |
19 |
19 |
|
} |
20 |
20 |
|
if (a!=sliders.opacity &&sliders.roboGui){ |
21 |
21 |
|
a= sliders.opacity; |
22 |
|
- |
this.renderer.material.color = new Color(this.renderer.material.color.r,this.renderer.material.color.b,this.renderer.material.color.g,1f*a); |
|
22 |
+ |
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); |
23 |
23 |
|
} |
24 |
24 |
|
} |
25 |
25 |
|
} |