Class EmotionType
An emotion type is a type of feeling that a PersonLike can have. The emotion that a person has results from that person's applied EmotionModifierEmotionModifier.Instances.
[JsonConverter(typeof(MigratingStaticJsonConverter<EmotionType>), new object[] { typeof(EmotionType), "PrivateTypes", true })]
public class EmotionType
- Inheritance
-
EmotionType
- Inherited Members
- Extension Methods
Constructors
EmotionType(string, TextureRegion, Color, TypeCategory, SoundEffect)
Creates a new emotion type with the given settings
public EmotionType(string name, TextureRegion icon, Color color, EmotionType.TypeCategory category, SoundEffect stingSound)
Parameters
name
stringThe emotion type's name
icon
TextureRegionThe emotion type's icon
color
ColorThe emotion type's color
category
EmotionType.TypeCategoryThis emotion type's category
stingSound
SoundEffectThe sound effect that should play when this emotion becomes active, or null to have no sound effect.
Fields
Angry
public static readonly EmotionType Angry
Field Value
Asleep
public static readonly EmotionType Asleep
Field Value
Bored
public static readonly EmotionType Bored
Field Value
Category
The EmotionType.TypeCategory that this emotion type fits into. The category is used for ordering and organizing EmotionModifier instances.
public readonly EmotionType.TypeCategory Category
Field Value
Color
The color that represents this emotion. The color is used as a backdrop for EmotionModifier instances of this type.
public readonly Color Color
Field Value
- Color
Confident
public static readonly EmotionType Confident
Field Value
Creative
public static readonly EmotionType Creative
Field Value
Embarrassed
public static readonly EmotionType Embarrassed
Field Value
Energetic
public static readonly EmotionType Energetic
Field Value
Fine
public static readonly EmotionType Fine
Field Value
Focused
public static readonly EmotionType Focused
Field Value
Frisky
public static readonly EmotionType Frisky
Field Value
Goofy
public static readonly EmotionType Goofy
Field Value
Happy
public static readonly EmotionType Happy
Field Value
Icon
This emotion's icon, which is used in the portrait section for a PersonLike that has this emotion
public readonly TextureRegion Icon
Field Value
- TextureRegion
Name
This emotion's name
public readonly string Name
Field Value
Relaxed
public static readonly EmotionType Relaxed
Field Value
Sad
public static readonly EmotionType Sad
Field Value
StingSound
The sting sound effect to play when this emotion becomes active. If this is null, no sound effect will play.
public readonly SoundEffect StingSound
Field Value
- SoundEffect
Stunned
public static readonly EmotionType Stunned
Field Value
Types
A registry of all EmotionType instances from the game and mods
public static readonly ReadOnlyDictionary<string, EmotionType> Types
Field Value
Uncomfortable
public static readonly EmotionType Uncomfortable
Field Value
Uneasy
public static readonly EmotionType Uneasy
Field Value
Properties
ParticleSpawner
public (Func<PersonLike, float> Chance, Action<PersonLike, Random> Spawner) ParticleSpawner { get; init; }
Property Value
- (Func<PersonLike, float> Chance, Action<PersonLike, Random> Spawner)
Priority
The priority that this emotion type has, which determines whether it is chosen over another emotion with the same total amount. A higher priority means the emotion is chosen over a lower priority one. The default priority is 0.
public int Priority { get; init; }
Property Value
Methods
Register(EmotionType)
Registers the given emotion type to the Types registry
public static EmotionType Register(EmotionType type)
Parameters
type
EmotionTypeThe type to register
Returns
- EmotionType
The passed type, for chaining