Пример #1
0
    // DEPRECATED METHOD - NO LONGER USED
    //   ONLY HERE IN CASE I CHANGE MY MIND :)
    //
    // Recieves the current user's quiz scores from Client2UIController.
    // Uses the scores to find the first score with the highest value,
    // then uses that as a result (unless the user manually picks a
    // different shoe).

    /*public override void SendScores(int[] scores)
     * {
     *  QuizAttributeType currentMax = QuizAttributeType.None;
     *  int max = 0;
     *  for(int i = 0; i < scores.Length; i++)
     *  {
     *      if(scores[i] > max)
     *      {
     *          max = scores[i];
     *          currentMax = (QuizAttributeType)i;
     *      }
     *  }
     *
     *  HandleQuizResult(currentMax);
     * }*/

    // Called by SendScores() & ButtonPickSpecificShoe()
    // Takes in a quiz result and makes that the user's result!
    //
    private void HandleQuizResult(QuizAttributeType resultIn)
    {
        quizResult = resultIn;

        string resultString = GetShoeName() + "!";

        resultText.text = resultString;
    }
 public QuizAtribute(QuizAttributeType typeIn, int weightIn)
 {
     type   = typeIn;
     weight = weightIn;
 }