Package FAtiMA.Core.emotionalState
Class Mood
java.lang.Object
FAtiMA.Core.emotionalState.Mood
- All Implemented Interfaces:
Serializable
Class that represents a character's mood.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Mood
public Mood()Creates a new neutral Mood
-
-
Method Details
-
GetMoodValue
public float GetMoodValue()Gets a float value that represents mood. Mood is ranged between [-10;10], a negative value represents a bad mood, a positive value represents good mood and values near 0 represent a neutral mood- Returns:
- a float value representing mood ranged in [-10;10]
-
DecayMood
public float DecayMood()Decays the mood according to the system's timer.- Returns:
- the mood's intensity after being decayed
-
UpdateMood
Updates the character's mood when a given emotion is "felt" by the character.- Parameters:
em- - the ActiveEmotion that will influence the character's current mood
-
SetMood
public void SetMood(float newMood) Manually sets a new value for Mood. Use it with caution and only when you explicitly want to change a character's mood without anything happening- Parameters:
newMood- - the new value of the mood. Must be ranged in [-10;10]. Remember that -10 represents a very bad mood, 10 a very good mood and values near 0 represent a neutral mood
-
toXml
-