/// <summary>
 /// Returns the next Problem for the Player as an instance of the Problem class.  If there aren't
 /// enough Problems left in the queue, an asynchronous task will retrieve more from the Senseix
 /// server.
 /// </summary>
 public static Problem NextProblem()
 {
     if (AllAnswerPartsGiven() && !GetMostRecentProblem().HasBeenSubmitted())
     {
         ThinksyPlugin.GetMostRecentProblem().SubmitAnswer();
     }
     Senseix.Message.Problem.ProblemData protobufsProblem = Senseix.SenseixSession.PullProblem();
     Senseix.Logger.BasicLog("Next problem!  Problem ID: " + protobufsProblem.uuid + " Category: " + protobufsProblem.category_name);
     //Debug.Log ("Next problem!  Problem ID: " + protobufsProblem.uuid + " Category: " + protobufsProblem.category_name);
     mostRecentProblem = new Problem(protobufsProblem);
     ThinksyQuestionDisplay.DisplayCurrentQuestion();
     return(mostRecentProblem);
 }
 void Start()
 {
     ThinksyQuestionDisplay.DisplayCurrentQuestion();
 }
Esempio n. 3
0
 /// <summary>
 /// Removes the most recent answer part.  You might use this if you want to give your player
 /// a chance to retry an incorrect answer part, without retrying the whole problem.
 /// </summary>
 public void RemoveMostRecentAnswerPart()
 {
     answerParts.RemoveAt(answerParts.Count - 1);
     ThinksyQuestionDisplay.DisplayCurrentQuestion();
 }
Esempio n. 4
0
 /// <summary>
 /// Adds a part to this answer.
 /// </summary>
 /// <param name="part">Added Part.</param>
 public void AddAnswerPart(ProblemPart part)
 {
     answerParts.Add(part);
     ThinksyQuestionDisplay.DisplayCurrentQuestion();
 }