TargetingService

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 class TargetingService : ITargetingService

Summary

Service that handles TargetingState events. Separates event handling from state data to maintain SRP. State objects contain data only, services handle events and business logic.

Metadata

Namespace: GridPlacement.Core.Services.Targeting

Source File: cs/Core/Services/Targeting/TargetingService.cs

Assembly: GridPlacement.Core

Type: class

Implements

  • ITargetingService

Constructors

TargetingService

1
public TargetingService()

Initializes a new instance of the TargetingService class.


Methods

EmitReadyChanged

1
public void EmitReadyChanged(bool isReady)

Emits ReadyChanged event if value actually changed


EmitTargetChanged

1
2
3
4
public void EmitTargetChanged(
    object? newTarget,
    object? oldTarget
)

Emits TargetChanged event if value actually changed


EmitPositionerChanged

1
public void EmitPositionerChanged(object? newPositioner)

Emits PositionerChanged event if value actually changed


EmitTargetMapChanged

1
public void EmitTargetMapChanged(object? newTargetMap)

Emits TargetMapChanged event if value actually changed


EmitMapsChanged

1
public void EmitMapsChanged(IList<object>? newMaps)

Emits MapsChanged event if value actually changed


MonitorStateChanges

1
public void MonitorStateChanges(TargetingState2D state)

Monitors state changes and emits appropriate events Call this after updating state properties


ClearCache

1
public void ClearCache()

Clears all last known values (useful for testing or reset)


Events

ReadyChanged

1
public event Action<bool>? ReadyChanged

Emitted when the readiness status of the state has changed.


TargetChanged

1
public event Action<object?, object?>? TargetChanged

Emitted when the target node changes.


PositionerChanged

1
public event Action<object?>? PositionerChanged

Emitted when the positioner node changes.


TargetMapChanged

1
public event Action<object?>? TargetMapChanged

Emitted when the target map node changes.


MapsChanged

1
public event Action<IList<object>?>? MapsChanged

Emitted when the list of known maps changes.