DragPathData
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Drag for a single drag operation between a start and end position
Source File: addons/grid_building/systems/building/data/drag_path_data.gd
Properties
Property:
start_position: Vector2Property:
current_position: Vector2Property:
time_held: float = 0.0Property:
drag_distance: float = 0.0Property:
last_tile: Vector2iProperty:
target_tile: Vector2iProperty:
next_tile: Vector2iProperty:
last_attempted_tile: Vector2i = Vector2i(999999, 999999)Property:
build_requests: int = 0Number of build requests made during this drag session. Incremented each time DragManager calls BuildingSystem.try_build(). Useful for monitoring drag-build behavior and verifying request throttling.
Property:
positioner: Node2DProperty:
targeting_state: [GridTargetingState](./grid-targeting-state/)Property:
is_dragging: bool = true
Public Methods
update
Updates the drag data with current frame delta time. Recalculates distance, time held, and target tile position for this drag operation.
delta: float - Time elapsed since last frame in seconds
get_tile_at_node_2d
Converts global position to tile coordinates on the specified map. Helper function for converting world positions to tilemap coordinates.
p_map: TileMapLayer - The tilemap layer to convert coordinates for
p_global_position: Vector2 - Global position to convert to tile coordinates
stop
Private Methods
_init
Flags: private