Exemple #1
0
    public void AddEmotion(EmotionType.Type emotion, float strength)
    {
        switch (emotion)
        {
        case EmotionType.Type.JOY:
            joyCount += strength;
            emotionCueManager.TriggerJoyAnimation();
            break;

        case EmotionType.Type.FEAR:
            fearCount += strength;
            emotionCueManager.TriggerFrightAnimation();
            break;

        case EmotionType.Type.ANGER:
            angerCount += strength;
            emotionCueManager.TriggerAngerAnimation();
            break;
        }
    }
Exemple #2
0
    private void Update()
    {
        if (joyCount >= 100)
        {
            currentEmotion = EmotionType.Type.JOY;
            Debug.Log(gameObject + ": emotion set to " + currentEmotion);
            postProcessing.profile = JoyProcessingProfile;
            worldManager.ChangeWorldToJOY();
            audioManager.Stop();
            audioManager.Play("Joy");


            ResetCounters();
            return;
        }
        if (fearCount >= 100)
        {
            currentEmotion = EmotionType.Type.FEAR;
            Debug.Log(gameObject + ": emotion set to " + currentEmotion);
            postProcessing.profile = FearProcessingProfile;
            worldManager.ChangeWorldToFEAR();
            audioManager.Stop();
            audioManager.Play("Fear");

            ResetCounters();
            return;
        }
        if (angerCount >= 100)
        {
            currentEmotion = EmotionType.Type.ANGER;
            Debug.Log(gameObject + ": emotion set to " + currentEmotion);
            postProcessing.profile = AngerProcessingProfile;
            worldManager.ChangeWorldToANGER();
            audioManager.Stop();
            audioManager.Play("Anger");

            ResetCounters();
            return;
        }
    }