public void Onclick() { score = new GameObject[2]; if(SelectWorld.worldNum!=1){ sel = GetComponent<SelectWorld> (); score[0] = GameObject.Find ("Score1-5"); score[0].GetComponent<Text> ().text = ""; score[1] = GameObject.Find ("Score6-10"); score[1].GetComponent<Text> ().text = ""; SelectWorld.worldNum--; sel.worldDisp (); } }
public void Onclick() { if(UserData.STAGE_NUM/5 >= SelectWorld.worldNum){ score = new GameObject[2]; sel = GetComponent<SelectWorld> (); score[0] = GameObject.Find ("Score1-5"); score[0].GetComponent<Text> ().text = ""; score[1] = GameObject.Find ("Score6-10"); score[1].GetComponent<Text> ().text = ""; SelectWorld.worldNum++; sel.worldNumDisp (); } }