CarveComponent

Namespace: Murder.Components
Assembly: Murder.dll

public sealed struct CarveComponent : IComponent

This is used for carve components within the map (that will not move a lot and should be taken into account on pathfinding). This a tag used when caching information in Map.

Implements: IComponent

⭐ Constructors

public CarveComponent()
public CarveComponent(bool blockVision, bool obstacle, bool clearPath, int weight)

Parameters
blockVision bool
obstacle bool
clearPath bool
weight int

⭐ Properties

BlockVision

public readonly bool BlockVision;

Returns
bool

CarveClearPath

public static CarveComponent CarveClearPath { get; }

Returns
CarveComponent

ClearPath

public readonly bool ClearPath;

Whether this carve component will add a path if there was previously a collision in its area. For example, a bridge over a river.

Returns
bool

Obstacle

public readonly bool Obstacle;

Returns
bool

Weight

public readonly int Weight;

Weight of the component, if not an obstacle. Ignored if CarveComponent.Obstacle is true.

Returns
int

⭐ Methods

WithClearPath(bool)

public CarveComponent WithClearPath(bool clearPath)

Parameters
clearPath bool

Returns
CarveComponent