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
timeGameTimeThe time
batchSpriteBatchThe sprite batch to use
codePointintThe code point of the character to draw
characterstringThe string representation of the character to draw
tokenTokenindexInTokenintThe index within this token that the character is at
stringPosVector2The position the string is drawn at.
charPosOffsetVector2The offset from the
stringPosthat the current character is drawn at.fontGenericFontThe font to use to draw
colorColorThe color to draw with
scaleVector2The scale to draw with.
rotationfloatThe rotation to draw with.
originVector2The origin to subtract from the position.
depthfloatThe depth to draw at
effectsSpriteEffectsThe flipping to draw with.
stringSizeVector2The size of the string.
charSizeVector2The size of the current character.
Returns
Update(GameTime)
Update this formatting code's animations etc.
public override void Update(GameTime time)
Parameters
timeGameTimeThe game's time