Ejemplo n.º 1
0
    public void StartIndividualPanel(string accountNameInput, DateTime periodStartDateInput)
    {
        accountName          = accountNameInput;
        periodStartDate      = periodStartDateInput;
        storageManagerScript = FindObjectOfType <StorageManager>();
        scoreBordScript      = FindObjectOfType <ScoreBord>();
        physicsManager       = FindObjectOfType <PhysicsManager>();

        selectedEventFiles     = scoreBordScript.GetAllSelectedEventFiles(accountName, periodStartDate);
        selectedEventFilesData = scoreBordScript.ReadAllEventFiles(selectedEventFiles);

        numberOfSessions.text  = scoreBordScript.GetNumberOfSessions(selectedEventFiles).ToString();
        totalTime.text         = physicsManager.FormatSeconds(scoreBordScript.GetTotalVar(selectedEventFilesData, 3, 2));  //Tijd heeft in racebestanden index 3 en in training index 2
        totalDistance.text     = physicsManager.FormatDistance(scoreBordScript.GetTotalVar(selectedEventFilesData, 2, 1)); //Afstand heeft in racebestanden index 2 en in training index 1
        totalEnergy.text       = physicsManager.FormatEnergy(scoreBordScript.GetTotalVar(selectedEventFilesData, 4, 3));   //Energie heeft in racebestanden index 4 em in training index 3
        racesParticipated.text = scoreBordScript.GetRacesParticipated(selectedEventFiles).ToString();
        racesWon.text          = scoreBordScript.GetRacesWon(selectedEventFilesData).ToString();
        if (scoreBordScript.GetAverageRankingInRaces(selectedEventFilesData) == 42)
        {
            racesAveragePosition.text = "Niet aan races deelgenomen";
        }
        else
        {
            racesAveragePosition.text = scoreBordScript.GetAverageRankingInRaces(selectedEventFilesData).ToString();
        }
    }
Ejemplo n.º 2
0
    public void StartCollectivePanel(DateTime periodStartDateInput)
    {
        periodStartDate      = periodStartDateInput;
        storageManagerScript = FindObjectOfType <StorageManager>();
        scoreBordScript      = FindObjectOfType <ScoreBord>();
        physicsManager       = FindObjectOfType <PhysicsManager>();

        selectedEventFiles     = scoreBordScript.GetAllSelectedEventFiles(null, periodStartDate);
        selectedEventFilesData = scoreBordScript.ReadAllEventFiles(selectedEventFiles);

        numberOfSessions.text = scoreBordScript.GetNumberOfSessions(selectedEventFiles).ToString();
        totalTime.text        = physicsManager.FormatSeconds(scoreBordScript.GetTotalVar(selectedEventFilesData, 3, 2));  //Tijd heeft in racebestanden index 3 en in training index 2
        totalDistance.text    = physicsManager.FormatDistance(scoreBordScript.GetTotalVar(selectedEventFilesData, 2, 1)); //Afstand heeft in racebestanden index 2 en in training index 1
        totalEnergy.text      = physicsManager.FormatEnergy(scoreBordScript.GetTotalVar(selectedEventFilesData, 4, 3));   //Energie heeft in racebestanden index 4 em in training index 1
        racesHeld.text        = scoreBordScript.GetRacesParticipated(selectedEventFiles).ToString();
    }