I have a script and I want it so that when I cant press a button the the alpha changes to half. my script is:
using UnityEngine;
using System.Collections;
public class Play : MonoBehaviour {
public static bool readyToGo;
public SpriteRenderer me;
void OnMouseDown(){
if (readyToGo) {
if (SelectMode.modeSelect == 0) {
Application.LoadLevel ("Original");
}
if (SelectMode.modeSelect == 1) {
Application.LoadLevel ("Ascension");
}
if (SelectMode.modeSelect == 2) {
Application.LoadLevel ("Freefall");
}
}
}
void Update(){
if (!readyToGo) {
//me.sprite.a = 0.5f;
}
}
}
Does anybody know how to achieve this?