Exemple #1
0
 private void HandleEmotion(Emotion previousEmotion, Emotion emotion)
 {
     //TODO: Handle emotion (if feared then heal or sth), maybe take shooter and special power if feared
     if (Emotion.Scared.Equals(emotion) || Emotion.Sad.Equals(emotion))
     {
         Heal((int)(0.1 * maxHealth));
     }
     else if (Emotion.Angry.Equals(emotion))
     {
         if (Emotion.Angry.Equals(previousEmotion))
         {
             if (playerShooter != null)
             {
                 playerShooter.ExecuteSpecial();
             }
         }
     }
     else if (Emotion.Happy.Equals(emotion) || Emotion.Excited.Equals(emotion))
     {
         if (Emotion.Happy.Equals(previousEmotion) || Emotion.Excited.Equals(previousEmotion))
         {
             TakeDamage((int)(0.2 * health));
         }
     }
     else if (Emotion.Neutral.Equals(emotion) || Emotion.Tired.Equals(emotion) || Emotion.Relaxed.Equals(emotion))
     {
         if (Emotion.Neutral.Equals(previousEmotion) || Emotion.Tired.Equals(previousEmotion) || Emotion.Relaxed.Equals(previousEmotion))
         {
             TakeDamage((int)(0.4 * health));
         }
     }
 }