Exemplo n.º 1
0
    public void AddToJsonList()
    {
        dataToExport.name           = nameInputField.text;
        dataToExport.teamName       = teamNameInputField.text;
        dataToExport.matchNumber    = matchNumberInputField.text;
        dataToExport.initiationLine = initiationLineDropDown.options[initiationLineDropDown.value].text.ToString();

        dataToExport.autonomousUpperCount = autonomousCounters.upperCount.ToString();
        dataToExport.autonomousInnerCount = autonomousCounters.innerCount.ToString();
        dataToExport.autonomousLowerCount = autonomousCounters.lowerCount.ToString();

        dataToExport.teleOpUpperCount = teleOpCounters.upperCount.ToString();
        dataToExport.teleOpInnerCount = teleOpCounters.innerCount.ToString();
        dataToExport.teleOpLowerCount = teleOpCounters.lowerCount.ToString();

        dataToExport.drivingEffectiveness  = drivingEffectivenessDropDown.value.ToString();
        dataToExport.defenseEffectiveness  = defenseEffectivenessDropDown.value.ToString();
        dataToExport.climbingEffectiveness = climbingEffectivenssDropDown.options[climbingEffectivenssDropDown.value].text;
        dataToExport.additionalNotes       = additionalNotesInputField.text;

        scoutingDataContainer.Add(dataToExport);

        int tempNum = Convert.ToInt32(matchNumberInputField.text) + 1;

        matchNumberInputField.text = tempNum.ToString();

        PrepareForNextMatch();
        notificationSystem.FinishedSaving();
    }