public void setAlternativeFromSave(AlternativeSave saveData) { for (int i = 0; i < alternativeRequirment.Count; i++) { for (int j = 0; j < alternativeRequirment[i].Count; j++) { alternativeRequirment[i][j].setFromData(((StatusBlockSave)saveData.StatsList[i]).StatsList[j]); } } }
public AlternativeSave getAlternativeSave() { AlternativeSave.Builder builder = AlternativeSave.CreateBuilder(); builder.SetUid(uid); foreach (List <StatusCheckable> l in alternativeRequirment) { StatusBlockSave.Builder bBuilder = StatusBlockSave.CreateBuilder(); foreach (StatusCheckable s in l) { StatusSave.Builder sBuilder = StatusSave.CreateBuilder(); sBuilder.SetAlreadyMet(s.isStatusMet()); s.setBuilderWithData(ref sBuilder); bBuilder.AddStats(sBuilder.Build()); } builder.AddStats(bBuilder.Build()); } return(builder.Build()); }