TargetingArea2D
Summary
Section titled “Summary”Encapsulates Area2D-based targeting logic as a reusable component Unlike ShapeCast2D which only detects PhysicsBody2D nodes, Area2D can detect other Area2D nodes
Properties
Section titled “Properties”debug_log_overlaps: bool = falseGB dependencies (typed)
Local debug flag: can be toggled per-instance in editor or by code
Methods
Section titled “Methods”func_ready( ) ->void
- Current target being tracked
func resolve_gb_dependencies(
p_container: GBCompositionContainer)
->void
- Resolve Grid Building dependencies (logger, targeting state)
func _physics_process(
_delta:float
)
->void
Physics process: continuously update targeting state based on Area2D overlaps
func update_target( ) ->void
Update the GridTargetingState.target based on current overlaps
func _on_area_entered(
area:Area2D
)
->void
- Called when an area enters overlap
func _on_area_exited(
area:Area2D
)
->void
- Called when an area exits overlap
Source
Section titled “Source”addons/grid_building/systems/grid_targeting/grid_positioner/targeting_area_2d.gd
This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.