Table of Contents

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

gridOccupancy IGridOccupancy

The ECS occupancy implementation to adapt.

Properties

SourceName

Gets a stable identifier describing the backing data source.

public string SourceName { get; }

Property Value

string

Methods

IsInBounds(CoreVector2I)

Determines whether the specified grid position is within valid bounds.

public bool IsInBounds(CoreVector2I position)

Parameters

position CoreVector2I

The grid position to inspect.

Returns

bool

true when the position is in bounds; otherwise false.

IsOccupied(CoreVector2I)

Determines whether the specified grid position is already occupied.

public bool IsOccupied(CoreVector2I position)

Parameters

position CoreVector2I

The grid position to inspect.

Returns

bool

true when the position is occupied; otherwise false.