Hello Community I need help getting a var (Woodnum) To change when OnClick is called.
#pragma strict
var theTextComponent : UI.Text;
var Wood : UI.Text;
var Woodnum = 1;
function Start () {
}
function Update () {
Wood.text = "Wood" + Woodnum;
}
function OnMouseDown () {
Destroy(gameObject);
theTextComponent.text = "+1 Block";
Woodnum = Woodnum + 1;
}