Emote - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life

TinyLife.Actions

Emote Class

An emote is a graphic that can be displayed in a bubble over a Person, usually as part of a conversation.

public class Emote

Inheritance System.Object 🡒 Emote

Constructors

Emote.Emote(TextureRegion, EmoteCategory) Constructor

Initializes a new emote with the given settings

public Emote(MLEM.Textures.TextureRegion texture, TinyLife.Actions.EmoteCategory categories);

Parameters

texture MLEM.Textures.TextureRegion
The texture that this emote should display

categories EmoteCategory
The categories that this emote should have. Can be a combined flag.

Fields

Emote.AllCategories Field

A set of all valid EmoteCategory values

public static readonly EmoteCategory[] AllCategories;

Field Value

EmoteCategory[]

Emote.Categories Field

A combined EmoteCategory flag that determines the categories that this emote belongs to

public readonly EmoteCategory Categories;

Field Value

EmoteCategory

Emote.Texture Field

The texture that is displayed for this emote

public readonly TextureRegion Texture;

Field Value

MLEM.Textures.TextureRegion

Methods

Emote.GetEmotes(EmoteCategory) Method

Returns a set of all of the emotes in the given combined category flag

public static System.Collections.Generic.IEnumerable<TinyLife.Actions.Emote> GetEmotes(TinyLife.Actions.EmoteCategory possibleCategories);

Parameters

possibleCategories EmoteCategory
The categories

Returns

System.Collections.Generic.IEnumerable<Emote>
A set of all emotes that match the categories

Emote.GetRandomEmote(EmoteCategory) Method

Returns a random emote from a combined flag of possible categories

public static TinyLife.Actions.Emote GetRandomEmote(TinyLife.Actions.EmoteCategory possibleCategories);

Parameters

possibleCategories EmoteCategory
The possible categories

Returns

Emote
A random emote from the given categories

Emote.Register(Emote) Method

Registers a new Emote with the given settings

public static void Register(TinyLife.Actions.Emote emote);

Parameters

emote Emote
The emote to register