TargetingArea2D

AUTO-GENERATED FILE – DO NOT EDIT MANUALLY

Encapsulates Area2D-based targeting logic as a reusable component Unlike ShapeCast2D which only detects PhysicsBody2D nodes, Area2D can detect other Area2D nodes

Source File: addons/grid_building/systems/grid_targeting/grid_positioner/targeting_area_2d.gd

Extends: Area2D

Exported Properties

  • Property: debug_log_overlaps: bool = false - Local debug flag: can be toggled per-instance in editor or by code

Private Properties

  • Property: _logger: [GBLogger](./gb-logger/) = null (private) - GB dependencies (typed)
  • Property: _targeting_state: [GridTargetingState](./grid-targeting-state/) = null (private)
  • Property: _current_target: Area2D = null (private) - Current target being tracked

Public Methods

resolve_gb_dependencies

1
resolve_gb_dependencies(p_container: GBCompositionContainer) -> void

Resolve Grid Building dependencies (logger, targeting state)


update_target

1
update_target() -> void

Update the GridTargetingState.target based on current overlaps


Private Methods

_ready

1
_ready() -> void

Flags: private


_physics_process

1
_physics_process(_delta: float) -> void

Flags: private

Physics process: continuously update targeting state based on Area2D overlaps


_on_area_entered

1
_on_area_entered(area: Area2D) -> void

Flags: private

Called when an area enters overlap


_on_area_exited

1
_on_area_exited(area: Area2D) -> void

Flags: private

Called when an area exits overlap