Beispiel #1
0
        private IEnumerator PlaceAnswer(Answer a)
        {
            var go = a.gameObject;

            go.GetComponent <StillLetterBox>().Poof();
            go.GetComponent <StillLetterBox>().Magnify();
            audioManager.PlayPoofSound();
            if (a.IsCorrect())
            {
                if (playbackAnswers.Count == 0 && AssessmentOptions.Instance.PlayCorrectAnswer)
                {
                    playbackAnswers.Add(a);
                }
                else if (AssessmentOptions.Instance.PlayAllCorrectAnswers)
                {
                    playbackAnswers.Add(a);
                }
            }

            yield return(Wait.For(Random.Range(0.07f, 0.13f)));
        }
        private IEnumerator PlaceAnswer(Answer answer, List <Vector3> positions)
        {
            var go = answer.gameObject;

            go.transform.localPosition = positions.Pull();
            go.GetComponent <StillLetterBox>().InstaShrink();
            go.GetComponent <StillLetterBox>().Poof();
            go.GetComponent <StillLetterBox>().Magnify();
            audioManager.PlayPoofSound();
            if (answer.IsCorrect())
            {
                if (playbackAnswers.Count == 0 && AssessmentOptions.Instance.PlayCorrectAnswer)
                {
                    playbackAnswers.Add(answer);
                }
                else if (AssessmentOptions.Instance.PlayAllCorrectAnswers)
                {
                    playbackAnswers.Add(answer);
                }
            }

            yield return(Wait.For(Random.Range(0.07f, 0.13f)));
        }