Question by
MagnumSerfs · Oct 17, 2016 at 02:31 PM ·
imagebuttonsevents
[HELP] Two buttons (1 and 2), if 2 is pressed after 1, Button 2 image changes.
I am Trying to make it that if "button 1" is pressed, then "button 2" is pressed directly afterwards: the image of "button 2" will change to "Tent"
public var a = null;
public static var object: GameObject;
function Update() {
if (Input.GetButtonDown("HouseText"))
a = true;
}
function onClick() {
if(a != null)
object.GetComponent<Image>().sprite = Tent;
}
Comment