Grid Placement

GBAStarPathManager

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/grid_targeting/managers/gb_astar_path_manager.gd

Version: 5.1

class_name: GBAStarPathManager extends: RefCounted

Summary

Manage configuration and path queries for AStarGrid2D instances used by grid targeting.

Signals

(none)

Exports

(none)

Methods

  • _init()
    • Optionally configure dependencies during construction. [param settings] Targeting settings to apply immediately.
  • get_grid()
    • Return the managed AStarGrid2D instance. [return] The active AStarGrid2D.
  • set_grid()
    • Replace the managed AStarGrid2D instance. [param grid] Grid to adopt; when null, a new AStarGrid2D is allocated.
  • configure()
    • Configure the manager using targeting settings and optional logger. [param settings] Targeting settings that drive grid configuration.
  • _apply_settings()
    • Apply the current settings to the managed grid, updating key heuristics and region.
  • _update_region_from_settings()
    • Update the grid region using the targeting settings region_size.
  • on_region_size_changed()
    • Respond to a region size change event from GridTargetingSettings. [param size] New region size to apply.
  • on_diagonal_mode_changed()
    • Respond to a diagonal mode change. [param mode] New diagonal mode.
  • on_default_compute_heuristic_changed()
    • Respond to a compute heuristic change. [param heuristic] New compute heuristic.
  • on_default_estimate_heuristic_changed()
    • Respond to an estimate heuristic change. [param heuristic] New estimate heuristic.
  • on_cell_shape_changed()
    • Respond to a cell shape change. [param shape] New cell shape.
  • update_region()
    • Update the cached region bounds from the provided map. [param map] Tile map the positioner operates on.
  • update_if_dirty()
    • Update the managed grid when marked dirty.
  • resolve_target_tile()
    • Resolve the desired target tile by applying region refresh and limiting rules. [param source] Node whose tile acts as the origin for adjacency limits. [param target_tile] Desired destination tile. [param map] Tile map providing region bounds. [param settings_override] Optional settings override used during limiting. [return] Tile clamped to region and adjacency limits.
  • get_closest_valid_tile()
    • Public facade: return the closest valid tile given a requested tile and a source node. This consolidates adjacency & region logic in one place for callers.
  • limit_tile_to_max_distance()
    • Limit the desired tile so it does not exceed the configured max distance from the source node. [param source] Node whose tile is used as the origin for distance checks. [param target_tile] Desired tile to clamp. [param map] Map used for conversions and fallback region data. [param settings_override] Optional override for targeting settings. [return] Tile respecting adjacency and region limits.
  • _limit_using_astar()
  • _limit_via_step()
  • _step_toward()
  • _sample_tile_from_node()