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

◆ AI_154_VoidLens()

void Terraria.Projectile.AI_154_VoidLens ( )
inlineprivate

Definition at line 55015 of file Projectile.cs.

55016 {
55017 //IL_0081: Unknown result type (might be due to invalid IL or missing references)
55018 //IL_008b: Unknown result type (might be due to invalid IL or missing references)
55019 //IL_0090: Unknown result type (might be due to invalid IL or missing references)
55020 Main.CurrentFrameFlags.HadAnActiveInteractibleProjectile = true;
55021 if (owner == Main.myPlayer)
55022 {
55023 for (int i = 0; i < 1000; i++)
55024 {
55025 if (i == whoAmI)
55026 {
55027 continue;
55028 }
55029 Projectile projectile = Main.projectile[i];
55030 if (projectile.active && projectile.owner == owner && projectile.type == type)
55031 {
55032 if (timeLeft < Main.projectile[i].timeLeft)
55033 {
55034 Kill();
55035 return;
55036 }
55037 Main.projectile[i].Kill();
55038 }
55039 }
55040 }
55041 velocity *= 0.94f;
55042 direction = 1;
55043 if (++frameCounter >= 5)
55044 {
55045 frameCounter = 0;
55046 if (++frame >= Main.projFrames[type])
55047 {
55048 frame = 0;
55049 }
55050 }
55051 if (Opacity < 1f)
55052 {
55053 Opacity += 0.03f;
55054 if (Opacity > 1f)
55055 {
55056 Opacity = 1f;
55057 }
55058 }
55059 new VoidLensHelper(this).Update();
55060 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
int frame
The frame number in the spritesheet that this projectile will be drawn with. Assign in M:Terraria....
int type
The Projectile ID of this projectile. The Projectile ID is a unique number assigned to each Projectil...
int timeLeft
Time in ticks before this projectile will naturally despawn. Each update timeLeft is decreased by 1...
int frameCounter
Used as a timer to decide when to change F:Terraria.Projectile.frame. Defaults to 0.

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

+ Here is the call graph for this function: