Exemplo n.º 1
0
 // when the "Reset" button is clicked
 public void buttonReset()
 {
     if (dataCollector != null)
     {
         dataCollector.setOutcome("reset");
         dataCollector.AddNewAttempt(SceneManager.GetActiveScene().name);
     }
     else
     {
         Debug.Log("Warning: DataCollector not found in scene.");
     }
     reset();
     //resultStr += "OUTCOME,RESET,NEW_ATTEMPT,tile,";
 }
Exemplo n.º 2
0
    // When Restart button is clicked after running out of time
    public void Restart()
    {
        //TODO: see if this is being counted as a new attempt each time
        dataCollector.AddNewAttempt(SceneManager.GetActiveScene().name);
        playerArrow.newGame();
        TimeOut.SetActive(false);
        timeRemainingPanel.alpha = 0; //hide TimeRemainingPanel

        timer = waitTime;
        float minutes = Mathf.Floor(timer / 60);
        float seconds = timer % 60;

        timeRemaining.text = "Time Left:\n\n" + minutes.ToString("00") + ":" + seconds.ToString("00");

        startIntroAndCountdown();
    }