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

◆ UpdateEnchantmentVisuals()

void Terraria.Projectile.UpdateEnchantmentVisuals ( )
inlineprivate

Definition at line 16425 of file Projectile.cs.

16426 {
16427 //IL_000a: Unknown result type (might be due to invalid IL or missing references)
16428 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
16429 //IL_0044: Unknown result type (might be due to invalid IL or missing references)
16430 //IL_0051: Unknown result type (might be due to invalid IL or missing references)
16431 //IL_005b: Unknown result type (might be due to invalid IL or missing references)
16432 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
16433 //IL_006b: Unknown result type (might be due to invalid IL or missing references)
16434 //IL_0088: Unknown result type (might be due to invalid IL or missing references)
16435 //IL_008d: Unknown result type (might be due to invalid IL or missing references)
16436 //IL_0092: Unknown result type (might be due to invalid IL or missing references)
16437 //IL_0095: Unknown result type (might be due to invalid IL or missing references)
16438 //IL_0097: Unknown result type (might be due to invalid IL or missing references)
16439 //IL_009c: Unknown result type (might be due to invalid IL or missing references)
16440 //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
16441 //IL_013a: Unknown result type (might be due to invalid IL or missing references)
16442 //IL_00f8: Unknown result type (might be due to invalid IL or missing references)
16443 //IL_00fd: Unknown result type (might be due to invalid IL or missing references)
16444 //IL_0100: Unknown result type (might be due to invalid IL or missing references)
16445 //IL_0111: Unknown result type (might be due to invalid IL or missing references)
16446 //IL_0122: Unknown result type (might be due to invalid IL or missing references)
16447 if (npcProj)
16448 {
16449 return;
16450 }
16451 Vector2 boxPosition = position;
16452 int boxWidth = width;
16453 int boxHeight = height;
16454 if (aiStyle == 190 || aiStyle == 191)
16455 {
16456 for (float num = -(float)Math.PI / 4f; num <= (float)Math.PI / 4f; num += (float)Math.PI / 2f)
16457 {
16458 Rectangle r = Utils.CenteredRectangle(base.Center + (rotation + num).ToRotationVector2() * 70f * scale, new Vector2(60f * scale, 60f * scale));
16459 EmitEnchantmentVisualsAt(r.TopLeft(), r.Width, r.Height);
16460 }
16461 }
16462 else if (ProjectileID.Sets.IsAWhip[type])
16463 {
16464 WhipPointsForCollision.Clear();
16466 Vector2 vector = WhipPointsForCollision[WhipPointsForCollision.Count - 1];
16467 EmitEnchantmentVisualsAt(new Vector2(vector.X - (float)(width / 2), vector.Y - (float)(height / 2)), width, height);
16468 }
16469 else
16470 {
16472 }
16473 }
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 bool[] IsAWhip
If true for a given projectile type (F:Terraria.Projectile.type), then that projectile will use whip ...
int aiStyle
Selects which vanilla code to use for the AI method. Vanilla projectile AI styles are enumerated in t...
static void FillWhipControlPoints(Projectile proj, List< Vector2 > controlPoints)
void EmitEnchantmentVisualsAt(Vector2 boxPosition, int boxWidth, int boxHeight)
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...
bool npcProj
If true, this projectile was spawned by a friendly Town NPC.
List< Vector2 > WhipPointsForCollision
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....

References Terraria.Projectile.aiStyle, Terraria.Utils.CenteredRectangle(), Terraria.Projectile.EmitEnchantmentVisualsAt(), Terraria.Projectile.FillWhipControlPoints(), Terraria.Entity.height, Terraria.ID.ProjectileID.Sets.IsAWhip, Terraria.Projectile.npcProj, Terraria.Entity.position, Terraria.Projectile.rotation, Terraria.Projectile.scale, Terraria.Projectile.type, Terraria.Projectile.WhipPointsForCollision, and Terraria.Entity.width.

Referenced by Terraria.Projectile.Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: