Esempio n. 1
0
    void AnswerWrong(GameObject x = null)
    {
        if (SoundManager.s_instance != null)
        {
            SoundManager.s_instance.PlaySound(SoundManager.s_instance.m_wrong);
        }

        if (curPhase == HotSpotPhase.Typing)
        {
            correctSpellingText.text = currentCorrectAnswer;
            correctSpellingText.gameObject.GetComponent <Fader>().StartFadeOut(4f);
        }
        redX.StartFade();
        BackgroundFlash.s_instance.FadeRed();
        AdjustMastery(false);
        Timer1.s_instance.timesUp = true;

        if (curPhase == HotSpotPhase.Elements || curPhase == HotSpotPhase.Groups)
        {
            if (x.transform.childCount == 0)
            {
                x.GetComponent <Image>().enabled = false;
            }

            else
            {
                foreach (Image im in x.GetComponentsInChildren <Image>())
                {
                    im.enabled = false;
                }
            }
        }
    }
Esempio n. 2
0
    bool AnswerCorrect()
    {
        AppManager.s_instance.saveTermMastery(
            AppManager.s_instance.currentAssignments[AppManager.s_instance.currIndex],
            allTerms[currIndex].arrayOfStrings[1],
            true
            );
        if (SoundManager.s_instance != null)
        {
            SoundManager.s_instance.PlaySound(SoundManager.s_instance.m_correct);
        }

        greenCheck.StartFade();          //TODO set in inspector
        foreach (GameObject go in draggables)
        {
            Destroy(go);
        }
        target.GetComponent <TargetGUI> ().Reset();
        draggables.Clear();
        AdjustMasteryMeter(true);
        DisableSubmitButton();

        if (masteryMeter.value > .97f)
        {
            WinRound();
            return(true);
        }
        else
        {
            return(false);
        }
    }