public void PlayerAbilitiesSetUp(PlayerSetup playerSetup) { ProgressBar[] progressBars = GameObject.FindObjectsOfType <ProgressBar>(); player = playerSetup.playerNum; for (var i = 0; i < 4; i++) { if (progressBars[i].player == player) { progressBar = progressBars[i]; } } }
public void PlayerAbilitiesSetUp(PlayerSetup playerSetup) { ProgressBar[] progressBars = GameObject.FindObjectsOfType<ProgressBar>(); player = playerSetup.playerNum; for (var i = 0; i < 4; i++) { if (progressBars[i].player == player) { progressBar = progressBars[i]; } } }