ExperimentManager.AdvanceLevel C# (CSharp) Method

AdvanceLevel() public method

public AdvanceLevel ( ) : void
return void
    public void AdvanceLevel()
    {
        // Save trial data before advancing
        if (currentTrial >= 0)
                PersistTrialData();

        currentTrial++;

        if (currentTrial < (totalTrials * tasksPerTrial)) {
            Application.LoadLevel("Leap_Project");
            // Debug.Log ("setting up trial: " + currentTrial);
            UpdateReferenceVariables();
        } else if (currentTrial >= 12) {
            // Save data
            WriteTrialDataToFile(subjectData.subjectID + ".csv");
            Application.LoadLevel("End");
        }
    }