Table of Contents

Interface ITargeting

Namespace
MoonBark.GridPlacement.Core.Interfaces
Assembly
MoonBark.GridPlacement.Core.dll

Interface for targeting state exposed by the targeting service. Used by the Godot layer to get current targeting information without depending on ECS types.

public interface ITargeting

Properties

CurrentTargetPosition

Gets the current target grid position.

CoreVector2I CurrentTargetPosition { get; }

Property Value

CoreVector2I

Revision

Gets a monotonically increasing revision number that changes whenever the target state changes.

long Revision { get; }

Property Value

long

TargetEntityId

Gets the current target entity ID, or -1 if no entity is targeted.

int TargetEntityId { get; }

Property Value

int

Methods

TrySetTargetPosition(CoreVector2I)

Attempts to set the current target position.

bool TrySetTargetPosition(CoreVector2I newPosition)

Parameters

newPosition CoreVector2I

The new target position.

Returns

bool

true if the position changed; otherwise false.

Events

TargetPositionChanged

Event raised when the target position changes.

event Action<CoreVector2I>? TargetPositionChanged

Event Type

Action<CoreVector2I>