// Start is called before the first frame update void Start() { input = GetComponent <OGoInput>(); shotPar.text = "Shots: 0 | Par: " + curSet.Par; bool listFull = false; HoleSetStats listHole = curSet; while (!listFull) { pars.Add(listHole.Par); if (!listHole.hole.nextSet) { listFull = true; } else { listHole = listHole.hole.nextSet; } } printScoreCard(); }
public Vector3 ChangeHole(HoleSetStats nextSet) { shots.Add(shotsThisHole); overallScore += shotsThisHole - curSet.Par; printScoreCard(); shotsThisHole = 0; if (nextSet != null) { curSet.toggleColliders(false); curSet = nextSet; curSet.toggleColliders(true); playerTeleporter.InitiateTeleport(curSet.getPlayerStartPoint()); shotPar.text = shotPar.text = "Shots: 0 | Par: " + curSet.Par; return(curSet.transform.position); } else { // run end of game function GetComponent <SceneController>().LoadNextScene(); return(Vector3.zero); } }