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

1
public interface IGridTargetingService

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

1
public abstract CoreVector2I CurrentTargetTile { get; }

Gets the current target tile


IsTargetingActive

1
public abstract bool IsTargetingActive { get; }

Checks if targeting is currently active


Configuration

1
public abstract TargetingConfiguration Configuration { get; }

Gets the current configuration


Methods

FindPath

1
2
3
4
List<CoreVector2I> FindPath(
    CoreVector2I startPosition,
    CoreVector2I endPosition
)

Finds a path between two grid positions

Parameters

NameDescription
startPositionStarting grid position
endPositionEnding grid position

Returns

List of grid positions representing the path, empty if no path found


IsPathClear

1
2
3
4
bool IsPathClear(
    CoreVector2I startPosition,
    CoreVector2I endPosition
)

Checks if a clear path exists between two positions

Parameters

NameDescription
startPositionStarting position
endPositionEnding position

Returns

True if a clear path exists


GetPathDistance

1
2
3
4
float GetPathDistance(
    CoreVector2I startPosition,
    CoreVector2I endPosition
)

Gets the path distance between two positions

Parameters

NameDescription
startPositionStarting position
endPositionEnding position

Returns

Distance in grid units, or MaxValue if no path


GetClosestValidTile

1
2
3
4
5
CoreVector2I GetClosestValidTile(
    CoreVector2I targetPosition,
    CoreVector2I sourcePosition,
    int maxDistance
)

Gets the closest valid tile to a target position

Parameters

NameDescription
targetPositionDesired target position
sourcePositionSource position for distance calculations
maxDistanceMaximum distance from source

Returns

Closest valid tile position


IsValidTargetTile

1
bool IsValidTargetTile(CoreVector2I position)

Validates if a tile position is valid for targeting

Parameters

NameDescription
positionTile position to validate

Returns

True if the tile is valid for targeting


IsWalkableTile

1
bool IsWalkableTile(CoreVector2I position)

Checks if a tile position is walkable

Parameters

NameDescription
positionTile position to check

Returns

True if the tile is walkable


GetValidTilesInRadius

1
2
3
4
List<CoreVector2I> GetValidTilesInRadius(
    CoreVector2I centerPosition,
    int radius
)

Gets all valid tiles within a specified radius

Parameters

NameDescription
centerPositionCenter position
radiusSearch radius

Returns

List of valid tile positions


ValidateTilePlacement

1
2
3
4
List<string> ValidateTilePlacement(
    CoreVector2I position,
    string? buildingType = null
)

Validates tile placement according to targeting rules

Parameters

NameDescription
positionTile position to validate
buildingTypeType of building (optional)

Returns

List of validation errors, empty if valid


UpdateGridNavigation

1
void UpdateGridNavigation(GridNavigationData gridData)

Updates the grid navigation data

Parameters

NameDescription
gridDataGrid navigation data

SetTileWalkability

1
2
3
4
void SetTileWalkability(
    CoreVector2I position,
    bool isWalkable
)

Sets walkability for a specific tile

Parameters

NameDescription
positionTile position
isWalkableWhether the tile is walkable

SetTileWeight

1
2
3
4
void SetTileWeight(
    CoreVector2I position,
    float weight
)

Sets weight for a specific tile

Parameters

NameDescription
positionTile position
weightTile weight (higher = more difficult to traverse)

ClearNavigationData

1
void ClearNavigationData()

Clears all navigation data


SetTargetTile

1
void SetTargetTile(CoreVector2I position)

Sets the current target tile

Parameters

NameDescription
positionNew target position

ClearTarget

1
void ClearTarget()

Clears the current target


SetTargetingEnabled

1
void SetTargetingEnabled(bool enabled)

Enables or disables targeting mode

Parameters

NameDescription
enabledWhether targeting should be enabled

UpdateConfiguration

1
void UpdateConfiguration(TargetingConfiguration config)

Updates targeting configuration

Parameters

NameDescription
configNew targeting configuration

ValidateSetup

1
List<string> ValidateSetup()

Validates the current targeting setup

Returns

List of validation issues, empty if valid


Events

PathCalculated

1
public abstract event EventHandler<PathCalculatedEventArgs>? PathCalculated

Event fired when a path is successfully calculated


PathCalculationFailed

1
public abstract event EventHandler<PathCalculationFailedEventArgs>? PathCalculationFailed

Event fired when path calculation fails


TargetingStateChanged

1
public abstract event EventHandler<TargetingStateChangedEventArgs>? TargetingStateChanged

Event fired when the targeting state changes