C# 继续计数

C# 继续计数,c#,unity3d,C#,Unity3d,我怎样才能停止这个没有回答的问题。当我点击一个按钮时计数 问题: 当我点击重置按钮时,NoAnsweredQuestion.Count仍在计数,直到达到最大限制 随机: private void SetcurrentQuestion() { int randomQuestionIndex = Random.Range(0, NoAnsweredQuestion.Count); currentQuestion = NoAnsweredQuestion[randomQuestionI

我怎样才能停止这个没有回答的问题。当我点击一个按钮时计数

问题: 当我点击重置按钮时,
NoAnsweredQuestion.Count
仍在计数,直到达到最大限制

随机:

private void SetcurrentQuestion()
{
    int randomQuestionIndex = Random.Range(0, NoAnsweredQuestion.Count);
    currentQuestion = NoAnsweredQuestion[randomQuestionIndex];

    factText.text = currentQuestion.fact;
    correctAnswerText.text = currentQuestion.answered;
}
这是我的极限:

重置按钮:


在您的重新启动方法中添加
NoAnsweredQuestion.Clear()
,它应该可以在您的重新启动方法中使用
NoAnsweredQuestion.Clear()
。Nathalia Soragge小姐。谢谢您的回答:)它的work@NathaliaSoragge我鼓励你将你的评论充实成一个完整的答案,并将其发布在下面。这样,OP可以接受您的答案,并且问题可以标记为已成功解决。(而且你们两人在接受回答时也会得到rep,这对于解锁这里的更多特权很好。)
public void ContinueTransition()
{
    if (NoAnsweredQuestion.Count == 10)
    {
        FinalScore.SetActive(true);
    }
    else
    {
        StartCoroutine(TransitiontoNextQuestion());
        updatequestion();
    }
}
public void Restart()
{
   var form = new WWWForm();
   var www  = new WWW(restartBegGrammarIAQ, form);

   SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
   Time.timeScale = 1f;
   GameIsPaused   = false;
}