IGridTargetingService
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.
Declaration
Summary
Core service interface for grid targeting and pathfinding operations. Provides engine-agnostic business logic for tile validation, pathfinding, and grid navigation without Godot dependencies.
Metadata
Namespace: GridPlacement.Core.Services.Targeting
Source File: cs/Core/Services/Targeting/IGridTargetingService.cs
Assembly: GridPlacement.Core
Type: interface
Properties
CurrentTargetTile
Gets the current target tile
IsTargetingActive
Checks if targeting is currently active
Configuration
Gets the current configuration
Methods
FindPath
Finds a path between two grid positions
Parameters
| Name | Description |
|---|---|
startPosition | Starting grid position |
endPosition | Ending grid position |
Returns
List of grid positions representing the path, empty if no path found
IsPathClear
Checks if a clear path exists between two positions
Parameters
| Name | Description |
|---|---|
startPosition | Starting position |
endPosition | Ending position |
Returns
True if a clear path exists
GetPathDistance
Gets the path distance between two positions
Parameters
| Name | Description |
|---|---|
startPosition | Starting position |
endPosition | Ending position |
Returns
Distance in grid units, or MaxValue if no path
GetClosestValidTile
Gets the closest valid tile to a target position
Parameters
| Name | Description |
|---|---|
targetPosition | Desired target position |
sourcePosition | Source position for distance calculations |
maxDistance | Maximum distance from source |
Returns
Closest valid tile position
IsValidTargetTile
Validates if a tile position is valid for targeting
Parameters
| Name | Description |
|---|---|
position | Tile position to validate |
Returns
True if the tile is valid for targeting
IsWalkableTile
Checks if a tile position is walkable
Parameters
| Name | Description |
|---|---|
position | Tile position to check |
Returns
True if the tile is walkable
GetValidTilesInRadius
Gets all valid tiles within a specified radius
Parameters
| Name | Description |
|---|---|
centerPosition | Center position |
radius | Search radius |
Returns
List of valid tile positions
ValidateTilePlacement
Validates tile placement according to targeting rules
Parameters
| Name | Description |
|---|---|
position | Tile position to validate |
buildingType | Type of building (optional) |
Returns
List of validation errors, empty if valid
UpdateGridNavigation
Updates the grid navigation data
Parameters
| Name | Description |
|---|---|
gridData | Grid navigation data |
SetTileWalkability
Sets walkability for a specific tile
Parameters
| Name | Description |
|---|---|
position | Tile position |
isWalkable | Whether the tile is walkable |
SetTileWeight
Sets weight for a specific tile
Parameters
| Name | Description |
|---|---|
position | Tile position |
weight | Tile weight (higher = more difficult to traverse) |
ClearNavigationData
Clears all navigation data
SetTargetTile
Sets the current target tile
Parameters
| Name | Description |
|---|---|
position | New target position |
ClearTarget
Clears the current target
SetTargetingEnabled
Enables or disables targeting mode
Parameters
| Name | Description |
|---|---|
enabled | Whether targeting should be enabled |
UpdateConfiguration
Updates targeting configuration
Parameters
| Name | Description |
|---|---|
config | New targeting configuration |
ValidateSetup
Validates the current targeting setup
Returns
List of validation issues, empty if valid
Events
PathCalculated
Event fired when a path is successfully calculated
PathCalculationFailed
Event fired when path calculation fails
TargetingStateChanged
Event fired when the targeting state changes