void recalculateScores(PotType nextTrending) { GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); for (int i = 0; i < players.Length; i++) { PotDetector potDetector = players[i].GetComponent <PotDetector>(); potDetector.recalculateScore(nextTrending); } }
void GetPlayersScore() { GameObject[] players = GameObject.FindGameObjectsWithTag("Player"); for (int i = 0; i < players.Length; i++) { PotDetector potDetector = players[i].GetComponent <PotDetector>(); potDetector.GetPlayerScore(trend); } }