private void SyncProgressionAcrossClients(float progression, int teamNumber) { CleaningProgressionStorage writeTo = FindStorageByTeamNumber(teamNumber); print("<b> progression of team </b>" + teamNumber + "changed to: " + progression); writeTo.progression = progression; }
private CleaningProgressionStorage FindStorageByTeamNumber(int teamNumber) { for (int i = 0; i < cleaningProgressionStorage.Count; i++) { if (cleaningProgressionStorage[i].team == teamNumber) { return(cleaningProgressionStorage[i]); } } print("<b> ADDED CLEANINGPROGRESSION OF TEAM: </b>" + teamNumber); CleaningProgressionStorage toReturn = new CleaningProgressionStorage() { team = teamNumber }; cleaningProgressionStorage.Add(toReturn); return(toReturn); }