TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.DataStructures.TileRestingInfo Struct Reference

Holds data required for offsetting an entity when it rests on a tile (sitting/sleeping). More...

+ Collaboration diagram for Terraria.DataStructures.TileRestingInfo:

Public Member Functions

 TileRestingInfo (Entity restingEntity, Point anchorTilePosition, Vector2 visualOffset, int targetDirection, int directionOffset=0, Vector2 finalOffset=default(Vector2), ExtraSeatInfo extraInfo=default(ExtraSeatInfo))
 
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

Entity RestingEntity
 The resting entity (Player or NPC). Can be null if not available from the context.
 
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.
 
Vector2 VisualOffset
 The visual offset of the entity, not affecting any logic.
 
int TargetDirection
 Direction the entity is facing while resting. Is 0 by default for beds.
 
int DirectionOffset
 Length of the entity position offset applied in the X direction based on targetDirection.
 
Vector2 FinalOffset
 Offset applied to the final anchor position. Use with caution, vanilla does not utilize it!
 
ExtraSeatInfo ExtraInfo
 Contains additional information, such as F:Terraria.GameContent.ExtraSeatInfo.IsAToilet.
 

Detailed Description

Holds data required for offsetting an entity when it rests on a tile (sitting/sleeping).

Definition at line 9 of file TileRestingInfo.cs.


The documentation for this struct was generated from the following file: