public void ClickBall( ) { if (this.gameObject.GetComponentInChildren <Text>().text == sharedobj.getCurentNumber().ToString()) { if (!sharedobj.getHardLevel()) { this.gameObject.GetComponent <Image>().sprite = DisableBall; this.gameObject.GetComponent <Button>().interactable = false; } sharedobj.setCurentNumber(sharedobj.getCurentNumber() + 1); sharedobj.setPlayersScoreListIndex(sharedobj.getPlayersScoreListIndex(sharedobj.getPlayersTurn() - 1) + 1, sharedobj.getPlayersTurn() - 1); //Debug.Log("score player num" +sharedobj.getPlayersTurn() + " : " + sharedobj.getPlayersScoreListIndex(sharedobj.getPlayersTurn()-1)); } }