Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int x=1;
- Image image;
- // Use this for initialization
- void Start () {
- image = GameObject.Find ("box1").GetComponent<Image> ();
- }
- // Update is called once per frame
- void Update () {
- }
- void OnMouseDown()
- {
- if (x == 1) {
- x=2;
- image.sprite = greenbox;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement