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

◆ MakeTransitionEffectsForTextureChanges()

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

Definition at line 87054 of file NPC.cs.

87055 {
87056 if (oldAltTexture == 0 && currentAltTexture == 1)
87057 {
87058 for (int i = 0; i < 20; i++)
87059 {
87060 Dust.NewDust(position, width, height / 4, 139 + Main.rand.Next(4), 0f, -2f);
87061 }
87062 }
87063 if (oldAltTexture == 1 && currentAltTexture == 0)
87064 {
87065 Utils.PoofOfSmoke(position);
87066 }
87067 if (type != 633)
87068 {
87069 return;
87070 }
87071 int num = 2;
87072 if ((oldAltTexture == 0 && currentAltTexture == num) || (oldAltTexture == num && currentAltTexture == 0))
87073 {
87074 for (int j = 0; j < 20; j++)
87075 {
87076 Dust dust = Dust.NewDustDirect(position, width, height, 262, 0f, -2f);
87077 dust.noGravity = true;
87078 dust.scale = 2f;
87079 }
87080 }
87081 }
Vector2 position
Definition Entity.cs:14
int type
Definition NPC.cs:445

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