Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using UnityEngine;
using System.Collections;

public class roboGui : MonoBehaviour {
	private float a=1f; //alpha control
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	if (sliders.roboGui && this.GetComponent<Renderer>().material.color.a==0f){
		this.GetComponent<Renderer>().material.color= new Color(1,1,1,1f*a);	
		}
		
	if (!sliders.roboGui && this.GetComponent<Renderer>().material.color.a==1f*a){
		this.GetComponent<Renderer>().material.color= new Color(1,1,1,0f);	
		}
		if (a!=sliders.opacity &&sliders.roboGui){
			a= sliders.opacity;
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);
		}
	}
}

Commits for Nextrek/3DSpace/Assets/Resources/Holographic/Scripts/roboGui.cs

Diff revisions: vs.
Revision Author Commited Message
168 Diff Diff LMancini picture LMancini Wed 08 Apr, 2015 12:33:35 +0000
112 Diff Diff FMMortaroli picture FMMortaroli Thu 09 Oct, 2014 14:21:59 +0000
107 FMMortaroli picture FMMortaroli Thu 09 Oct, 2014 11:56:46 +0000