Table of Contents

Temporary Animated Sprite

Temporary animated sprites are ways to show animated effects on screen temporarily. They existed prior to 1.6, but was given a proper data model to use in Data/Machines.

For trinket tinker, any field that calls for temporary animated sprites takes string ids corresponding to an entry in mushymato.TrinketTinker/TAS rather than the full definition. This let you reuse the same TAS in multiple places.

TemporaryAnimatedSpriteDefinition

Note

TemporaryAnimatedSpriteDefinition is a class provided by the game, not defined by this mod.

Property Type Default Notes
Id string required Unique string id
Condition string null Game state query, show TAS if true.
Texture string required Texture asset name.
SourceRect Rectangle required Area of texture to draw.
Interval float 100 Time between frames, in miliseconds.
Frames int 1 Length of the animation.
Loops int null Number of times to repeat the animation.
PositionOffset Vector2 Vector2.Zero Offset added to position during draw.
Flicker bool null Skips drawing every other frame.
Flip bool false Horizontally flip the sprite during draw.
SortOffset float null Offset on layer depth, for determining whether this sprite appear over or under other sprites.
AlphaFade float null Amount of additional transparency every frame. Set this to make the sprite fade away over time.
Scale float 1f Draw scale, applied on top of the default 4x scale.
ScaleChange float null Amount of additional scale every frame. Set this to make sprite enlarge/shrink over time.
Rotation float null Amount of rotation on the sprite.
RotationChange float null Amount of additional rotation every frame. Set this to make the sprite spin.
Color string null Color to apply on draw, for use with grayscale sprites.
Aside from RGB and hex values, monogame accepts named colors.