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
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
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
GameTimeThe time
batch
SpriteBatchThe sprite batch to use
codePoint
intThe code point of the character to draw
character
stringThe string representation of the character to draw
token
TokenindexInToken
intThe index within this token that the character is at
stringPos
Vector2The position the string is drawn at.
charPosOffset
Vector2The offset from the
stringPos
that the current character is drawn at.font
GenericFontThe font to use to draw
color
ColorThe color to draw with
scale
Vector2The scale to draw with.
rotation
floatThe rotation to draw with.
origin
Vector2The origin to subtract from the position.
depth
floatThe depth to draw at
effects
SpriteEffectsThe flipping to draw with.
stringSize
Vector2The size of the string.
charSize
Vector2The size of the current character.
Returns
Update(GameTime)
Update this formatting code's animations etc.
public override void Update(GameTime time)
Parameters
time
GameTimeThe game's time