Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // button-veggie
- // Veggie buttons
- var newmat:Material;
- function Start()
- {
- newmat = Resources.Load("tx-temp-reddot");
- }
- function OnMouseOver ()
- {
- if (Input.GetMouseButtonDown(0))
- {
- //renderer.material = newmat; // swaps the texture on click
- // renderer.material.color -= Color(100, 100, 0) * Time.deltaTime; // changes tint - don't know what time.deltaTime is for?
- // renderer.material.color -=Color(0.2, 0.3, 0.4, 0.5); // R,G,B,A 1 is 255
- renderer.material.color -=Color(.8, .7, .6, 0); // R,G,B,A 1 is 255
- Debug.Log("Clicked: "+gameObject.name);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement