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

◆ AABBRectangle

Rectangle Terraria.Gore.AABBRectangle
get

Definition at line 67 of file Gore.cs.

68 {
69 get
70 {
71 if (TextureAssets.Gore[type].IsLoaded)
72 {
73 Rectangle sourceRectangle = Frame.GetSourceRectangle(TextureAssets.Gore[type].Value);
74 return new Rectangle((int)position.X, (int)position.Y, (int)((float)sourceRectangle.Width * scale), (int)((float)sourceRectangle.Height * scale));
75 }
76 return new Rectangle(0, 0, 1, 1);
77 }
78 }
static Asset< Texture2D >[] Gore
Vector2 position
Definition Gore.cs:17
SpriteFrame Frame
Definition Gore.cs:41
int type
Definition Gore.cs:27
float scale
Definition Gore.cs:23
Rectangle GetSourceRectangle(Texture2D texture)