tModLoader v2024.11
A mod to make and play Terraria mods
|
Holds data required for offsetting an entity when it rests on a tile (sitting/sleeping). More...
Public Member Functions | |
TileRestingInfo (Entity restingEntity, Point anchorTilePosition, Vector2 visualOffset, int targetDirection, int directionOffset=0, Vector2 finalOffset=default, ExtraSeatInfo extraInfo=default) | |
void | Deconstruct (out Entity restingEntity, out Point anchorTilePosition, out Vector2 visualOffset, out int targetDirection, out int directionOffset, out Vector2 finalOffset, out ExtraSeatInfo extraInfo) |
Public Attributes | |
Point | AnchorTilePosition |
The bottom-most position of the resting tile in tile coordinates, affecting logic for resetting (invalid) resting state and used to align the hitbox. | |
int | DirectionOffset |
Length of the entity position offset applied in the X direction based on targetDirection. | |
ExtraSeatInfo | ExtraInfo |
Contains additional information, such as ExtraSeatInfo.IsAToilet. | |
Vector2 | FinalOffset |
Offset applied to the final anchor position. Use with caution, vanilla does not utilize it! | |
Entity | RestingEntity |
The resting entity (Player or NPC). Can be null if not available from the context. | |
int | TargetDirection |
Direction the entity is facing while resting. Is 0 by default for beds. | |
Vector2 | VisualOffset |
The visual offset of the entity, not affecting any logic. | |
Holds data required for offsetting an entity when it rests on a tile (sitting/sleeping).