Skip to content

WireSensor

namespace Griff.Modules.Contraptions;
public sealed class WireSensor : Component

Notices things inside its collider (usually a trigger): output “Out” is 1 while anything is there, and “Count” says how many. A pressure plate, a doorway that opens as you come, a finish line.

This is a component: its saved properties are on its component page.

public int Count { get; }

How many things are inside it.

public string? Layers { get; set; }

The collision layers it notices, e.g. “Player”. Empty notices anything with a Body.

public bool Out { get; }

True while anything is inside it.

public bool AcceptsLayer(string? layer)