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
TargetEntityId
Gets the current target entity ID, or -1 if no entity is targeted.
int TargetEntityId { get; }
Property Value
Methods
TrySetTargetPosition(CoreVector2I)
Attempts to set the current target position.
bool TrySetTargetPosition(CoreVector2I newPosition)
Parameters
newPositionCoreVector2IThe new target position.
Returns
- bool
trueif the position changed; otherwisefalse.
Events
TargetPositionChanged
Event raised when the target position changes.
event Action<CoreVector2I>? TargetPositionChanged
Event Type
- Action<CoreVector2I>