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

◆ Resize()

void Terraria.Projectile.Resize ( int newWidth,
int newHeight )
inline

Changes the F:Terraria.Entity.width and F:Terraria.Entity.height of the projectile while preserving the P:Terraria.Entity.Center. Useful for explosive projectiles that expand their hitbox while exploding.

Definition at line 21266 of file Projectile.cs.

21267 {
21268 //IL_0002: Unknown result type (might be due to invalid IL or missing references)
21269 //IL_0007: Unknown result type (might be due to invalid IL or missing references)
21270 //IL_001c: Unknown result type (might be due to invalid IL or missing references)
21271 position = base.Center;
21272 width = newWidth;
21273 height = newHeight;
21274 base.Center = position;
21275 }
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

References Terraria.Entity.height, Terraria.Entity.position, and Terraria.Entity.width.