EmotionType - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life

TinyLife.Emotions

EmotionType Class

An emotion type is a type of feeling that a Person can have.
The emotion that a person has results from that person's applied EmotionModifierInstances.

public class EmotionType

Inheritance System.Object 🡒 EmotionType

Constructors

EmotionType.EmotionType(string, TextureRegion, Color, TypeCategory) Constructor

Creates a new emotion type with the given settings

public EmotionType(string name, MLEM.Textures.TextureRegion icon, Microsoft.Xna.Framework.Color color, TinyLife.Emotions.EmotionType.TypeCategory category);

Parameters

name System.String
The emotion type's name

icon MLEM.Textures.TextureRegion
The emotion type's icon

color Microsoft.Xna.Framework.Color
The emotion type's color

category TypeCategory
This emotion type's category

Fields

EmotionType.Category Field

The TypeCategory that this emotion type fits into.
The category is used for ordering and organizing EmotionModifier instances.

public readonly TypeCategory Category;

Field Value

TypeCategory

EmotionType.Color Field

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

Microsoft.Xna.Framework.Color

EmotionType.Icon Field

This emotion's icon, which is used in the portrait section for a Person that has this emotion

public readonly TextureRegion Icon;

Field Value

MLEM.Textures.TextureRegion

EmotionType.Name Field

This emotion's name

public readonly string Name;

Field Value

System.String

EmotionType.Types Field

A registry of all EmotionType instances from the game and mods

public static readonly IDictionary<string,EmotionType> Types;

Field Value

System.Collections.Generic.IDictionary<System.String,EmotionType>

Methods

EmotionType.Register(EmotionType) Method

Registers the given emotion type to the Types registry

public static TinyLife.Emotions.EmotionType Register(TinyLife.Emotions.EmotionType type);

Parameters

type EmotionType
The type to register

Returns

EmotionType
The passed type, for chaining