Пример #1
0
 public void setStatus(string status, Color color)
 {
     statusText.text  = status;
     statusText.color = color;
     timer            = 0f;
     ZoomHelper.setUIVisibility(statusGroup, true);
 }
Пример #2
0
 public override void OnStateExit()
 {
     if (!questionController.isQuestionRemaining())
     {
         ZoomHelper.setUIVisibility(player, true);
     }
 }
Пример #3
0
 public override void OnStateExit()
 {
     guessColour.reset();
     answerColour.reset();
     ZoomHelper.setUIVisibility(answerGroup, false);
     ZoomHelper.setUIVisibility(questionGroup, false);
     ZoomHelper.setUIVisibility(answersLeftGroup, false);
 }
Пример #4
0
    public override void OnStateEnter()
    {
        mull.treeDistance = 600f;


        ZoomHelper.setUIVisibility(cameraControlButtons.GetComponent <CanvasGroup>(), false);
        ZoomHelper.setMarkerVisibility(false);
    }
Пример #5
0
 public override void OnStateExit()
 {
     ZoomHelper.setUIVisibility(discoveredCanvas, false);
     ZoomHelper.setUIVisibility(goingToQuizCanvas, false);
     camera.transform.SetParent(null);
     playerController.setIsControlled(false);
     statusController.setCanDiscover(true);
 }
Пример #6
0
    public override void OnStateEnter()
    {
        if (qc.isQuizActive())
        {
            camera.SetState(new QuestionState(camera));
        }

        ZoomHelper.setUIVisibility(cameraControlButtons, true);
    }
Пример #7
0
 // Update is called once per frame
 void Update()
 {
     if (timer >= screenTime)
     {
         ZoomHelper.setUIVisibility(statusGroup, false);
     }
     else
     {
         timer += Time.deltaTime;
     }
 }
Пример #8
0
    public override void OnStateEnter()
    {
        mull.treeDistance = 2f;


        ZoomHelper.setUIVisibility(infoBox, false);
        ZoomHelper.setUIVisibility(backButton, false);

        camera.transform.rotation = camera.getLastRotation();

        hiker.transform.rotation = hiker.GetComponent <OnHoverHiker> ().initialRotation;
    }
Пример #9
0
    public override void OnStateEnter()
    {
        AudioSource correctGuessSound   = guessSounds[0];
        AudioSource incorrectGuessSound = guessSounds[1];


        guessColour.guessedColour();
        answerColour.correctColour();

        if (isGaelic)
        {
            infoContainer.answerText.text = "An Fhreagairt Cheart: " + answer.headname;
            infoContainer.guessText.text  = "Do Fhreagairt: " + guess.GetComponent <SettlementInformation> ().headname;
            moveOn.text = "Air aghaidh";
        }
        else
        {
            infoContainer.answerText.text = "The correct answer: " + answer.headname;
            infoContainer.guessText.text  = "Your answer: " + guess.GetComponent <SettlementInformation> ().headname;
            moveOn.text = "Continue";
        }

        if (qc.isCorrect())
        {
            if (isGaelic)
            {
                infoContainer.answerStatus.text = "Ceart!";
            }
            else
            {
                infoContainer.answerStatus.text = "Correct!";
            }
            infoContainer.answerStatus.color = Color.green;
            correctGuessSound.Play();
        }
        else
        {
            if (isGaelic)
            {
                infoContainer.answerStatus.text = "Ceàrr!";
            }
            else
            {
                infoContainer.answerStatus.text = "Wrong!";
            }
            infoContainer.answerStatus.color = new Color32(255, 53, 53, 255);
            incorrectGuessSound.Play();
        }

        ZoomHelper.setUIVisibility(answerGroup, true);
    }
Пример #10
0
    public override void OnStateEnter()
    {
        questionController.setCurrentQuestion();
        if (isGaelic)
        {
            questionText.text = questionController.getCurrentQuestion().text_gaelic;
            answersLeft.text  = "" + questionController.questionsLeftToAnswer() + " freagairtean ceart air fhàgail";
        }
        else
        {
            questionText.text = questionController.getCurrentQuestion().text_english;
            answersLeft.text  = "" + questionController.questionsLeftToAnswer() + " correct answers remaining!";
        }

        camera.transform.position = camera.getBasePosition();
        ZoomHelper.setUIVisibility(questionGroup, true);
        ZoomHelper.setUIVisibility(answersLeftGroup, true);
        ZoomHelper.setUIVisibility(player, false);
    }
Пример #11
0
 /* Code happening on each frame -  handling case when player moves to quiz */
 public override void Tick()
 {
     if (qc.isQuizActive() && timer <= totalTime)
     {
         if (timer == 0f)
         {
             statusController.setCanDiscover(false);
             ZoomHelper.setUIVisibility(goingToQuizCanvas, true);
         }
         timer += Time.deltaTime;
         if (isGaelic)
         {
             goingToQuizText.text = "Ceistean ann an " + Math.Ceiling(totalTime - timer);
         }
         else
         {
             goingToQuizText.text = "Going to quiz in " + Math.Ceiling(totalTime - timer);
         }
     }
     else if (qc.isQuizActive() && timer > totalTime)
     {
         camera.SetState(new UnfocusingState(camera));
     }
 }
Пример #12
0
 public override void OnStateEnter()
 {
     ZoomHelper.setUIVisibility(infoBox, true);
     ZoomHelper.setUIVisibility(backButton, true);
 }