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

◆ AI_168_FirstFractal()

void Terraria.Projectile.AI_168_FirstFractal ( )
inlineprivate

Definition at line 49340 of file Projectile.cs.

49341 {
49342 //IL_0051: Unknown result type (might be due to invalid IL or missing references)
49343 //IL_0061: Unknown result type (might be due to invalid IL or missing references)
49344 //IL_0067: Unknown result type (might be due to invalid IL or missing references)
49345 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
49346 //IL_006d: Unknown result type (might be due to invalid IL or missing references)
49347 //IL_00de: Unknown result type (might be due to invalid IL or missing references)
49348 //IL_011e: Unknown result type (might be due to invalid IL or missing references)
49349 //IL_0125: Unknown result type (might be due to invalid IL or missing references)
49350 //IL_012a: Unknown result type (might be due to invalid IL or missing references)
49351 //IL_0142: Unknown result type (might be due to invalid IL or missing references)
49352 //IL_0159: Unknown result type (might be due to invalid IL or missing references)
49353 //IL_015e: Unknown result type (might be due to invalid IL or missing references)
49354 //IL_0173: Unknown result type (might be due to invalid IL or missing references)
49355 //IL_0196: Unknown result type (might be due to invalid IL or missing references)
49356 //IL_01a0: Unknown result type (might be due to invalid IL or missing references)
49357 //IL_01a5: Unknown result type (might be due to invalid IL or missing references)
49358 //IL_01ab: Unknown result type (might be due to invalid IL or missing references)
49359 //IL_01b1: Unknown result type (might be due to invalid IL or missing references)
49360 //IL_01bb: Unknown result type (might be due to invalid IL or missing references)
49361 //IL_01c0: Unknown result type (might be due to invalid IL or missing references)
49362 //IL_01c5: Unknown result type (might be due to invalid IL or missing references)
49363 float num = 60f;
49364 if ((localAI[0] += 1f) >= num - 1f)
49365 {
49366 Kill();
49367 return;
49368 }
49369 if (frameCounter == 0)
49370 {
49371 frameCounter = 1;
49372 frame = Main.rand.Next(15);
49373 }
49374 velocity = velocity.RotatedBy(ai[0]);
49375 Opacity = Utils.GetLerpValue(0f, 12f, localAI[0], clamped: true) * Utils.GetLerpValue(num, num - 12f, localAI[0], clamped: true);
49376 direction = ((velocity.X > 0f) ? 1 : (-1));
49378 rotation = (float)Math.PI / 4f * (float)spriteDirection + velocity.ToRotation();
49379 if (spriteDirection == -1)
49380 {
49381 rotation += (float)Math.PI;
49382 }
49383 if (localAI[0] > 7f)
49384 {
49385 int num2 = 5;
49386 _ = base.Center - new Vector2((float)num2);
49387 if (Main.rand.Next(15) == 0)
49388 {
49389 Dust dust = Dust.NewDustPerfect(base.Center, 278, null, 100, Color.Lerp(GetFirstFractalColor(), Color.White, Main.rand.NextFloat() * 0.3f));
49390 dust.scale = 0.7f;
49391 dust.noGravity = true;
49392 dust.velocity *= 0.5f;
49393 dust.velocity += velocity * 2f;
49394 }
49395 }
49396 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

References Terraria.Utils.GetLerpValue(), Terraria.Dust.NewDustPerfect(), and Terraria.Main.rand.

+ Here is the call graph for this function: