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

◆ AI_131_FlameBurstShot()

void Terraria.Projectile.AI_131_FlameBurstShot ( )
inlineprivate

Definition at line 75334 of file Projectile.cs.

75335 {
75336 //IL_004a: Unknown result type (might be due to invalid IL or missing references)
75337 //IL_0173: Unknown result type (might be due to invalid IL or missing references)
75338 //IL_00ba: Unknown result type (might be due to invalid IL or missing references)
75339 //IL_00f2: Unknown result type (might be due to invalid IL or missing references)
75340 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)
75341 //IL_010d: Unknown result type (might be due to invalid IL or missing references)
75342 //IL_0117: Unknown result type (might be due to invalid IL or missing references)
75343 //IL_011c: Unknown result type (might be due to invalid IL or missing references)
75344 if (type != 664 && type != 666 && type != 668)
75345 {
75346 return;
75347 }
75348 if (localAI[0] == 0f)
75349 {
75350 localAI[0] = 1f;
75352 }
75353 if (alpha > 0)
75354 {
75355 alpha -= 25;
75356 if (alpha < 0)
75357 {
75358 alpha = 0;
75359 }
75360 }
75361 int num = 1;
75362 if (type == 666)
75363 {
75364 num = 2;
75365 }
75366 if (type == 668)
75367 {
75368 num = 3;
75369 }
75370 for (int i = 0; i < num; i++)
75371 {
75372 if (Main.rand.Next(2) != 0)
75373 {
75374 Dust dust = Dust.NewDustDirect(position, width, height, 6, velocity.X * 0.2f, velocity.Y * 0.2f, 100, default(Color), 2f);
75375 dust.noGravity = true;
75376 dust.velocity *= 0.3f;
75377 if (Main.rand.Next(1) == 0)
75378 {
75379 dust.velocity.Y += (float)Math.Sign(dust.velocity.Y) * 1.2f;
75380 dust.fadeIn += 0.5f;
75381 }
75382 }
75383 }
75384 rotation = velocity.ToRotation() + (float)Math.PI / 2f;
75385 }
static SlotId PlayTrackedSound(in SoundStyle style, Vector2? position=null)
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
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
static readonly SoundStyle DD2_FlameburstTowerShot
Definition SoundID.cs:63
int alpha
How transparent to draw this projectile. 0 to 255. 255 is completely transparent. ExampleBulletsets...
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...

References Terraria.ID.SoundID.DD2_FlameburstTowerShot, Terraria.Dust.NewDustDirect(), Terraria.Audio.SoundEngine.PlayTrackedSound(), Terraria.Main.rand, and Terraria.Dust.velocity.

+ Here is the call graph for this function: