Subversion Repository Public Repository

Nextrek

Diff Revisions 167 vs 168 for /3DSpace/Assets/Resources/Holographic/Scripts/health.cs

Diff revisions: vs.
  @@ -17,8 +17,8 @@
17 17 void Awake()
18 18 {
19 19 //Get a reference to the Material of the game object this script is attached to
20 - this.goMaterial = this.renderer.material;
21 - this.renderer.material.color = new Color(this.renderer.material.color.r,this.renderer.material.color.b,this.renderer.material.color.g,.65f*a);
20 + this.goMaterial = this.GetComponent<Renderer>().material;
21 + 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);
22 22 }
23 23
24 24 void Start ()