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

◆ AI_161_RapierStabs()

void Terraria.Projectile.AI_161_RapierStabs ( )
inlineprivate

Definition at line 50784 of file Projectile.cs.

50785 {
50786 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
50787 //IL_0075: Unknown result type (might be due to invalid IL or missing references)
50788 //IL_007c: Unknown result type (might be due to invalid IL or missing references)
50789 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
50790 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
50791 //IL_009a: Unknown result type (might be due to invalid IL or missing references)
50792 //IL_00a6: Unknown result type (might be due to invalid IL or missing references)
50793 //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
50794 Player player = Main.player[owner];
50795 rotation = velocity.ToRotation() + (float)Math.PI / 2f;
50796 ai[0] += 1f;
50797 float opacity = Utils.GetLerpValue(0f, 7f, ai[0], clamped: true) * Utils.GetLerpValue(16f, 12f, ai[0], clamped: true);
50798 Opacity = opacity;
50799 base.Center = player.RotatedRelativePoint(player.MountedCenter, reverseRotation: false, addGfxOffY: false) + velocity * (ai[0] - 1f);
50800 spriteDirection = ((!(Vector2.Dot(velocity, Vector2.UnitX) < 0f)) ? 1 : (-1));
50801 if (ai[0] >= 16f)
50802 {
50803 Kill();
50804 }
50805 else
50806 {
50807 player.heldProj = whoAmI;
50808 }
50809 }
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...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
float rotation
Rotation of the projectile. Radians not Degrees. Use T:Microsoft.Xna.Framework.MathHelper if you want...

References Terraria.Utils.GetLerpValue(), Terraria.Player.MountedCenter, Terraria.Main.player, and Terraria.Player.RotatedRelativePoint().

+ Here is the call graph for this function: