void GameOver() { for (int i = 0; i < buttonList.Length; i++) { buttonList[i].GetComponentInParent <Button>().interactable = false; } int score = generalInfo.getScore(); if (playerSide == "player") { score++; generalInfo.setScore(score); generalInfo.ChangeScore(score); Debug.Log(generalInfo.getScore()); } else { generalInfo.setScore(score - 1); generalInfo.ChangeScore(score - 1); Debug.Log(generalInfo.getScore()); } }
public void viewScore() { Debug.Log(generalInfo.getScore()); generalInfo.ChangeScore(5); }