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

◆ AI_131_FlameBurstShot()

void Terraria.Projectile.AI_131_FlameBurstShot ( )
inlineprivate

Definition at line 57748 of file Projectile.cs.

57749 {
57750 //IL_0051: Unknown result type (might be due to invalid IL or missing references)
57751 if (type != 664 && type != 666 && type != 668)
57752 {
57753 return;
57754 }
57755 if (localAI[0] == 0f)
57756 {
57757 localAI[0] = 1f;
57759 }
57760 if (alpha > 0)
57761 {
57762 alpha -= 25;
57763 if (alpha < 0)
57764 {
57765 alpha = 0;
57766 }
57767 }
57768 int num = 1;
57769 if (type == 666)
57770 {
57771 num = 2;
57772 }
57773 if (type == 668)
57774 {
57775 num = 3;
57776 }
57777 for (int i = 0; i < num; i++)
57778 {
57779 if (Main.rand.Next(2) != 0)
57780 {
57781 Dust dust = Dust.NewDustDirect(position, width, height, 6, velocity.X * 0.2f, velocity.Y * 0.2f, 100, default(Color), 2f);
57782 dust.noGravity = true;
57783 dust.velocity *= 0.3f;
57784 if (Main.rand.Next(1) == 0)
57785 {
57786 dust.velocity.Y += (float)Math.Sign(dust.velocity.Y) * 1.2f;
57787 dust.fadeIn += 0.5f;
57788 }
57789 }
57790 }
57791 rotation = velocity.ToRotation() + (float)Math.PI / 2f;
57792 }
const double PI
Definition Math.cs:16
static int Sign(decimal value)
Definition Math.cs:1202
static SlotId PlayTrackedSound(SoundStyle style, Vector2 position)
Vector2 velocity
Definition Entity.cs:16
Vector2 position
Definition Entity.cs:14
static readonly LegacySoundStyle DD2_FlameburstTowerShot
Definition SoundID.cs:792

References Terraria.ID.SoundID.DD2_FlameburstTowerShot, Terraria.Dust.NewDustDirect(), System.Math.PI, Terraria.Audio.SoundEngine.PlayTrackedSound(), Terraria.Main.rand, System.Math.Sign(), System.type, Terraria.Dust.velocity, and Microsoft.Xna.Framework.Vector2.Y.