Table of Contents

Class EmotionType

Namespace
TinyLife.Emotions
Assembly
Tiny Life.dll

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 EmotionModifier EmotionModifier.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 string

The emotion type's name

icon TextureRegion

The emotion type's icon

color Color

The emotion type's color

category EmotionType.TypeCategory

This emotion type's category

stingSound SoundEffect

The 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

EmotionType

Asleep

public static readonly EmotionType Asleep

Field Value

EmotionType

Bored

public static readonly EmotionType Bored

Field Value

EmotionType

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

EmotionType.TypeCategory

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

EmotionType

Creative

public static readonly EmotionType Creative

Field Value

EmotionType

Embarrassed

public static readonly EmotionType Embarrassed

Field Value

EmotionType

Energetic

public static readonly EmotionType Energetic

Field Value

EmotionType

Fine

public static readonly EmotionType Fine

Field Value

EmotionType

Focused

public static readonly EmotionType Focused

Field Value

EmotionType

Frisky

public static readonly EmotionType Frisky

Field Value

EmotionType

Goofy

public static readonly EmotionType Goofy

Field Value

EmotionType

Happy

public static readonly EmotionType Happy

Field Value

EmotionType

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

string

Relaxed

public static readonly EmotionType Relaxed

Field Value

EmotionType

Sad

public static readonly EmotionType Sad

Field Value

EmotionType

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

EmotionType

Types

A registry of all EmotionType instances from the game and mods

public static readonly ReadOnlyDictionary<string, EmotionType> Types

Field Value

ReadOnlyDictionary<string, EmotionType>

Uncomfortable

public static readonly EmotionType Uncomfortable

Field Value

EmotionType

Uneasy

public static readonly EmotionType Uneasy

Field Value

EmotionType

Properties

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

int

Methods

Register(EmotionType)

Registers the given emotion type to the Types registry

public static EmotionType Register(EmotionType type)

Parameters

type EmotionType

The type to register

Returns

EmotionType

The passed type, for chaining