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

◆ MakeTransitionEffectsForTextureChanges()

void Terraria.NPC.MakeTransitionEffectsForTextureChanges ( int oldAltTexture,
int currentAltTexture )
inlineprivate

Definition at line 107016 of file NPC.cs.

107017 {
107018 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
107019 //IL_000c: Unknown result type (might be due to invalid IL or missing references)
107020 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
107021 //IL_0043: Unknown result type (might be due to invalid IL or missing references)
107022 //IL_008d: Unknown result type (might be due to invalid IL or missing references)
107023 //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
107024 //IL_00b6: Unknown result type (might be due to invalid IL or missing references)
107025 if (oldAltTexture == 0 && currentAltTexture == 1)
107026 {
107027 for (int i = 0; i < 20; i++)
107028 {
107029 Dust.NewDust(position, width, height / 4, 139 + Main.rand.Next(4), 0f, -2f);
107030 }
107031 }
107032 if (oldAltTexture == 1 && currentAltTexture == 0)
107033 {
107034 Utils.PoofOfSmoke(position);
107035 }
107036 if (type != 633)
107037 {
107038 return;
107039 }
107040 int num = 2;
107041 if ((oldAltTexture == 0 && currentAltTexture == num) || (oldAltTexture == num && currentAltTexture == 0))
107042 {
107043 for (int j = 0; j < 20; j++)
107044 {
107045 Dust dust = Dust.NewDustDirect(position, width, height, 262, 0f, -2f);
107046 dust.noGravity = true;
107047 dust.scale = 2f;
107048 }
107049 }
107050 }
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....
Definition NPC.cs:990

References Terraria.Dust.NewDust(), Terraria.Dust.NewDustDirect(), Terraria.Utils.PoofOfSmoke(), and Terraria.Main.rand.

+ Here is the call graph for this function: