Esempio n. 1
0
    public void ChangeEmotions(DataType.MonsterEmotions emotionToChangeTo)
    {
        EmotionData.EmotionStruct emoStruct = emoDict[emotionToChangeTo];

        spriteRenderer.sprite   = emoStruct.sprite;
        monster.selectedEmotion = emoStruct.emotion;
    }
 public void CheckEmotion(DataType.MonsterEmotions emotion, AudioClip clip)
 {
     if (inputAllowed && (isTutorialRunning || gameStarted))
     {
         inputAllowed = false;
         SubtitlePanel.Instance.Display(emotion.ToString(), clip);
         if (emotion == generator.GetSelectedEmotion())
         {
             TimerClock.Instance.StopTimer();
             SoundManager.Instance.PlaySFXClip(answerSounds[1]);
             if (isTutorialRunning)
             {
                 TutorialFinished();
             }
             else
             {
                 ++score;
                 UpdateScoreGauge();
                 if (score >= scoreGoal)
                 {
                     StartCoroutine(PostGame());
                 }
                 else
                 {
                     DrawCards(waitDuration);
                 }
             }
         }
         else
         {
             StartCoroutine(WrongAnswerWait(waitDuration));
         }
     }
 }
    public Color GetEmotionColor(DataType.MonsterEmotions emo)
    {
        switch (emo)
        {
        case DataType.MonsterEmotions.Afraid:
            return(afraidColor);

        case DataType.MonsterEmotions.Disgusted:
            return(disgustedColor);

        case DataType.MonsterEmotions.Happy:
            return(happyColor);

        case DataType.MonsterEmotions.Joyous:
            return(joyousColor);

        case DataType.MonsterEmotions.Mad:
            return(madColor);

        case DataType.MonsterEmotions.Sad:
            return(sadColor);

        case DataType.MonsterEmotions.Thoughtful:
            return(thoughtfulColor);

        case DataType.MonsterEmotions.Worried:
            return(worriedColor);

        default:
            return(Color.white);
        }
    }
 public void CheckEmotion(DataType.MonsterEmotions emotion, AudioClip clip)
 {
     if (inputAllowed)
     {
         inputAllowed = false;
         SubtitlePanel.Instance.Display(emotion.ToString(), clip);
         if (emotion == generator.GetSelectedEmotion())
         {
             SoundManager.Instance.PlayCorrectSFX();
             Invoke("EndReview", 2f);
         }
         else
         {
             StartCoroutine(WrongAnswerWait(waitDuration));
         }
     }
 }
Esempio n. 5
0
 public void ChangeEmotions(DataType.MonsterEmotions emotionToChangeTo)
 {
     monsterAnimator.ChangeEmotions(emotionToChangeTo);
 }
 public void ChangeMonsterEmotion(DataType.MonsterEmotions emo)
 {
     monster.GetComponent <Monster> ().ChangeEmotions(emo);
 }