Class EcsPlacementOccupancySource
- Namespace
- MoonBark.GridPlacement.Core.Services.Placement
- Assembly
- MoonBark.GridPlacement.Core.dll
Adapts an IGridOccupancy implementation into a placement occupancy source.
public sealed class EcsPlacementOccupancySource : IPlacementOccupancySource
- Inheritance
-
EcsPlacementOccupancySource
- Implements
- Inherited Members
Constructors
EcsPlacementOccupancySource(IGridOccupancy)
Initializes a new instance of the EcsPlacementOccupancySource class.
public EcsPlacementOccupancySource(IGridOccupancy gridOccupancy)
Parameters
gridOccupancyIGridOccupancyThe ECS occupancy implementation to adapt.
Properties
SourceName
Gets a stable identifier describing the backing data source.
public string SourceName { get; }
Property Value
Methods
IsInBounds(CoreVector2I)
Determines whether the specified grid position is within valid bounds.
public bool IsInBounds(CoreVector2I position)
Parameters
positionCoreVector2IThe grid position to inspect.
Returns
- bool
truewhen the position is in bounds; otherwisefalse.
IsOccupied(CoreVector2I)
Determines whether the specified grid position is already occupied.
public bool IsOccupied(CoreVector2I position)
Parameters
positionCoreVector2IThe grid position to inspect.
Returns
- bool
truewhen the position is occupied; otherwisefalse.