Nextrek
Diff Revisions
112
vs
168
for /3DSpace/Assets/Resources/Holographic/Scripts/pulse.cs
|
@@ -18,8 +18,8 @@ |
18 |
18 |
|
void Awake() |
19 |
19 |
|
{ |
20 |
20 |
|
//Get a reference to the Material of the game object this script is attached to |
21 |
|
- |
this.goMaterial = this.renderer.material; |
22 |
|
- |
this.renderer.material.color = new Color(this.renderer.material.color.r,this.renderer.material.color.b,this.renderer.material.color.g,.65f*a); |
|
21 |
+ |
this.goMaterial = this.GetComponent<Renderer>().material; |
|
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,.65f*a); |
23 |
23 |
|
} |
24 |
24 |
|
|
25 |
25 |
|
void Start () |
|
@@ -42,7 +42,7 @@ |
42 |
42 |
|
|
43 |
43 |
|
if (a!=sliders.opacity){ |
44 |
44 |
|
a= sliders.opacity; |
45 |
|
- |
this.renderer.material.color = new Color(this.renderer.material.color.r,this.renderer.material.color.b,this.renderer.material.color.g,.65f*a); |
|
45 |
+ |
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,.65f*a); |
46 |
46 |
|
} |
47 |
47 |
|
if (t>10){ |
48 |
48 |
|
t=0; |