Esempio n. 1
0
    void FinishRound()
    {
        int numCorrect = CountCorrectItems(currentQuestion);

        questionMap.Remove(currentQuestion);
        timeBeforeCreatingNextQuestion = Time.time + howLongToCelebrate;
        isAwaitingNextQuestion         = true;

        boxStacker.AddBox(numCorrect);
        numQuestionsRemaining--;
        if (numQuestionsRemaining < 0)
        {
            numQuestionsRemaining = 0;
        }
        currentQuestion = invalidQuestion;

        if (singleQuestionCelebration != null)
        {
            singleQuestionCelebration.Play();
        }

        if (numCorrect > 0)
        {
            playAnimController.StartRunningState(false);
            playAnimController.Celebrate();
        }
    }
Esempio n. 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyUp(KeyCode.Space) == true)
     {
         stacker.AddBox(3);
         Vector3 top = stacker.GetHighestPoint();
         top.y++;
         Vector3 pos = man.transform.position;
         pos = top;
         man.transform.position = pos;
     }
 }