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

◆ getRect()

Rectangle Terraria.Item.getRect ( )
inline

Gets this T:Terraria.Item's hitbox in the world. Equivalent to P:Terraria.Entity.Hitbox.

Returns
This T:Terraria.Item's hitbox in the world.

Definition at line 1921 of file Item.cs.

1922 {
1923 //IL_0024: Unknown result type (might be due to invalid IL or missing references)
1924 return new Rectangle((int)position.X, (int)position.Y, width, height);
1925 }
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.