Skip to main content

Mask

A class in Root.Township, Alta.Caves.PluginParts.

Cave generator part that sets cells to a fail value wherever another plugin's layer is on the wrong side of a threshold.

Constructors​

MemberWhat it is
Mask()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

4 private and internal fields
MemberWhat it is
private float failBacking field for Fail.
private bool isMoreThanBacking field for IsMoreThan.
private Plugin maskBacking field for MaskPlugin.
private float maskThresholdBacking field for MaskThreshold.

Properties​

MemberWhat it is
float Fail { get; }Value written to masked-out cells.
bool IsMoreThan { get; }When true (the default), cells pass where the mask is at or above the threshold. When false, they pass where it is below.
Plugin MaskPlugin { get; }The plugin whose layer is read as the mask.
float MaskThreshold { get; }Mask value that decides pass or fail (default 1).

Methods​

MemberWhat it is
override IPartInstance GetInstance(PluginInstance plugin)Creates the MaskInstance that does the work.

Used in​

Members of other types that take, return or hold a Mask: