Class AreaBlocker
A manually placed blocker that obstructs a two-dimensional XZ-plane area on one world Y layer.
public class AreaBlocker : Blocker, IBlocker
- Inheritance
-
AreaBlocker
- Implements
- Inherited Members
Constructors
AreaBlocker(GridWorld, FixedBoundArea, Fixed64, bool, bool)
Initializes a new area blocker bound to the supplied world.
public AreaBlocker(GridWorld world, FixedBoundArea blockArea, Fixed64 layerY = default, bool isActive = true, bool cacheCoveredVoxels = false)
Parameters
worldGridWorldThe world whose grids this blocker should affect.
blockAreaFixedBoundAreaThe XZ-plane area to block.
layerYFixed64The world Y layer to block. Defaults to zero.
isActiveboolFlag whether or not blocker is active.
cacheCoveredVoxelsboolFlag whether or not to cache covered voxels.
AreaBlocker(GridWorld, Vector2d, Vector2d, Fixed64, bool, bool)
Initializes a new area blocker from XZ-plane min/max bounds.
public AreaBlocker(GridWorld world, Vector2d boundsMin, Vector2d boundsMax, Fixed64 layerY = default, bool isActive = true, bool cacheCoveredVoxels = false)
Parameters
worldGridWorldThe world whose grids this blocker should affect.
boundsMinVector2dThe 2D minimum bound whose X component maps to world X and Y component maps to world Z.
boundsMaxVector2dThe 2D maximum bound whose X component maps to world X and Y component maps to world Z.
layerYFixed64The world Y layer to block. Defaults to zero.
isActiveboolFlag whether or not blocker is active.
cacheCoveredVoxelsboolFlag whether or not to cache covered voxels.
Methods
GetBoundsMax()
Gets the max bounds of the area to block. Must be implemented by subclasses.
protected override Vector3d GetBoundsMax()
Returns
- Vector3d
GetBoundsMin()
Gets the min bounds of the area to block. Must be implemented by subclasses.
protected override Vector3d GetBoundsMin()
Returns
- Vector3d