TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ RegisterItemAnimation()

static void Terraria.Main.RegisterItemAnimation ( int index,
DrawAnimation animation )
inlinestatic

Registers an animation for an item type to draw inside UI (not world or held item on player). To enable its animation in the world, use ItemID.Sets.AnimatesAsSoul in conjunction with this.

Parameters
indexItem type
animationDraw animation

Definition at line 3636 of file Main.cs.

3637 {
3638 if (!itemAnimationsRegistered.Contains(index))
3639 {
3640 itemAnimationsRegistered.Add(index);
3641 }
3642 itemAnimations[index] = animation;
3643 }
static List< int > itemAnimationsRegistered
Definition Main.cs:1858
static DrawAnimation[] itemAnimations
Definition Main.cs:1852

References Terraria.Main.itemAnimations, and Terraria.Main.itemAnimationsRegistered.

Referenced by Terraria.Main.InitializeItemAnimations().

+ Here is the caller graph for this function: