Table of Contents

Class WobblyCode

Namespace
MLEM.Formatting.Codes
Assembly
MLEM.dll

An instance of a formatting code that can be used for a TextFormatter. To add a new formatting code, see Codes

public class WobblyCode : AnimatedCode, IGenericDataHolder
Inheritance
WobblyCode
Implements
Inherited Members

Constructors

WobblyCode(Match, Regex, float, float)

public WobblyCode(Match match, Regex regex, float modifier, float heightModifier)

Parameters

match Match
regex Regex
modifier float
heightModifier float

Fields

TimeIntoAnimation

The time that this wobbly animation has been running for. To reset its animation progress, reset this value.

public TimeSpan TimeIntoAnimation

Field Value

TimeSpan

Methods

DrawCharacter(GameTime, SpriteBatch, int, string, Token, int, Vector2, ref Vector2, GenericFont, ref Color, ref Vector2, ref float, ref Vector2, float, SpriteEffects, Vector2, Vector2)

Draws a given code point using this token's formatting options.

public override bool DrawCharacter(GameTime time, SpriteBatch batch, int codePoint, string character, Token token, int indexInToken, Vector2 stringPos, ref Vector2 charPosOffset, GenericFont font, ref Color color, ref Vector2 scale, ref float rotation, ref Vector2 origin, float depth, SpriteEffects effects, Vector2 stringSize, Vector2 charSize)

Parameters

time GameTime

The time

batch SpriteBatch

The sprite batch to use

codePoint int

The code point of the character to draw

character string

The string representation of the character to draw

token Token
indexInToken int

The index within this token that the character is at

stringPos Vector2

The position the string is drawn at.

charPosOffset Vector2

The offset from the stringPos that the current character is drawn at.

font GenericFont

The font to use to draw

color Color

The color to draw with

scale Vector2

The scale to draw with.

rotation float

The rotation to draw with.

origin Vector2

The origin to subtract from the position.

depth float

The depth to draw at

effects SpriteEffects

The flipping to draw with.

stringSize Vector2

The size of the string.

charSize Vector2

The size of the current character.

Returns

bool

Update(GameTime)

Update this formatting code's animations etc.

public override void Update(GameTime time)

Parameters

time GameTime

The game's time