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

◆ AI_154_VoidLens()

void Terraria.Projectile.AI_154_VoidLens ( )
inlineprivate

Definition at line 42456 of file Projectile.cs.

42457 {
42458 Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile = true;
42459 if (owner == Main.myPlayer)
42460 {
42461 for (int i = 0; i < 1000; i++)
42462 {
42463 if (i == whoAmI)
42464 {
42465 continue;
42466 }
42467 Projectile projectile = Main.projectile[i];
42468 if (projectile.active && projectile.owner == owner && projectile.type == type)
42469 {
42470 if (timeLeft < Main.projectile[i].timeLeft)
42471 {
42472 Kill();
42473 return;
42474 }
42475 Main.projectile[i].Kill();
42476 }
42477 }
42478 }
42479 velocity *= 0.94f;
42480 direction = 1;
42481 if (++frameCounter >= 5)
42482 {
42483 frameCounter = 0;
42484 if (++frame >= Main.projFrames[type])
42485 {
42486 frame = 0;
42487 }
42488 }
42489 if (Opacity < 1f)
42490 {
42491 Opacity += 0.03f;
42492 if (Opacity > 1f)
42493 {
42494 Opacity = 1f;
42495 }
42496 }
42497 new VoidLensHelper(this).Update();
42498 }
Vector2 velocity
Definition Entity.cs:16

References Terraria.Entity.active, Terraria.Main.myPlayer, Terraria.Projectile.owner, Terraria.Main.projectile, Terraria.Main.projFrames, System.type, Terraria.Projectile.type, and Terraria.GameContent.VoidLensHelper.Update().