コード例 #1
0
        private void CompareAnswerToQuestionForMedal(string key)
        {
            if (inputFieldNumber.text == LoadFileJson.LoadAnswer(key).answer)
            {
                LoadFileJson.SaveAnswerResult(key);
            }

            if ((togglesRedHat.value + 1).ToString() == LoadFileJson.LoadAnswer(key).answer)
            {
                LoadFileJson.SaveAnswerResult(key);
                return;
            }

            if ((togglesYellowHat.value + 1).ToString() == LoadFileJson.LoadAnswer(key).answer)
            {
                LoadFileJson.SaveAnswerResult(key);
                return;
            }

            if (inputFieldSubtraction.text == LoadFileJson.LoadAnswer(key).answer)
            {
                LoadFileJson.SaveAnswerResult(key);
                return;
            }

            if (inputFieldFinal.text == LoadFileJson.LoadAnswer(key).answer)
            {
                LoadFileJson.SaveAnswerResult(key);
            }
        }
コード例 #2
0
 private void CompareAnswerToQuestion(string key)
 {
     if (inputFieldText.text == LoadFileJson.LoadAnswer(key).answer)
     {
         LoadFileJson.SaveAnswerResult(key);
         return;
     }
 }
コード例 #3
0
        public override void Initialization(CallbackScreen callback)
        {
            _callback = callback;

            _questionDialogue = LoadFileJson.LoadDialogue("Question4");
            questionDialogue.SetSentence(_questionDialogue.sentences[0]);

            InitValuesAnimation();
        }
コード例 #4
0
    private void SetDialogues()
    {
        _titleDialogue  = LoadFileJson.LoadDialogue("TitleFinal");
        _bodyDialogue   = LoadFileJson.LoadDialogue("BodyBoard");
        _footerDialogue = LoadFileJson.LoadDialogue("Esfuerzate");

        _completeMedalDialogue    = LoadFileJson.LoadDialogue("CompleteMedal");
        _incompleteMedalDialogue1 = LoadFileJson.LoadDialogue("IncompleteMedal1");
        _incompleteMedalDialogue2 = LoadFileJson.LoadDialogue("IncompleteMedal2");
    }
コード例 #5
0
        private void OnAcceptModalButtonClick()
        {
            _sequenceMachine.CurrentState.Exit();
            CompareAnswerToQuestionForMedal(_keyAnswers);

            if (LoadFileJson.IsCorrectAnswerResult(_keyAnswers))
            {
                _sequenceMachine.ChangeState(congratulationModalState);
            }
            else
            {
                AdvanceToNextSequenceState();
            }
        }
コード例 #6
0
    private void SetSentences()
    {
        var numberCorrectAnswers = LoadFileJson.NumberOfCorrectAnswers();
        var totalNumberAnswers   = LoadFileJson.TotalNumberOfAnswers();

        if (numberCorrectAnswers == totalNumberAnswers)
        {
            _bodyDialogue = _completeMedalDialogue;
            _hasTheCup    = true;
        }
        else
        {
            var missingAnswers = totalNumberAnswers - numberCorrectAnswers;
            _bodyDialogue.sentences[0] = _incompleteMedalDialogue1.sentences[0] + missingAnswers +
                                         _incompleteMedalDialogue2.sentences[0];
        }

        titleDialogue.SetSentence(_titleDialogue.sentences[0]);
        bodyDialogue.SetSentence(_bodyDialogue.sentences[0]);
        footerDialogue.SetSentence(_footerDialogue.sentences[0]);

        var duration = .5f;

        title.DOFade(1f, duration);
        body.DOFade(1f, duration);
        footer.DOFade(1f, duration).OnComplete(() =>
        {
            titleDialogue.StartDialogue(_titleDialogue, () =>
            {
                bodyDialogue.StartDialogue(_bodyDialogue, () =>
                {
                    footerDialogue.StartDialogue(_footerDialogue, ExitAnimation);
                });
            });
        });
    }
コード例 #7
0
 private void SetDialogues()
 {
     _questionDialogue = LoadFileJson.LoadDialogue("Question3");
 }
コード例 #8
0
 private void SetDialogues()
 {
     _dialogue = LoadFileJson.LoadDialogue("FlameAnswer1");
 }
コード例 #9
0
 private void SetDialogues()
 {
     _attentionDialogue = LoadFileJson.LoadDialogue("Attention2");
     _questionDialogue  = LoadFileJson.LoadDialogue("Question2");
 }
コード例 #10
0
 private void SetDialogues()
 {
     _howGoingLearnDialogue = LoadFileJson.LoadDialogue("HowGoingLearn");
     _attentionDialogue     = LoadFileJson.LoadDialogue("Attention");
     _statementDialogue     = LoadFileJson.LoadDialogue("Statement");
 }
コード例 #11
0
 private void Awake()
 {
     LoadFileJson.ResetAnswerResult();
 }
コード例 #12
0
 private void SetDialogues()
 {
     _question = LoadFileJson.LoadDialogue("WhatGoingToLearn");
     _answer   = LoadFileJson.LoadDialogue("ToLearn");
 }
コード例 #13
0
 private void SetDialogues()
 {
     _firstDialogue  = LoadFileJson.LoadDialogue("DialogueMan1");
     _secondDialogue = LoadFileJson.LoadDialogue("DialogueMan2");
 }
コード例 #14
0
 private void SetDialogues()
 {
     _question = LoadFileJson.LoadDialogue("YouDoNeed");
 }