Skip to content

WireGate

namespace Griff.Modules.Contraptions;
public sealed class WireGate : Component, IDrawable

A logic gate or bit of math for wiring contraptions: inputs A and B, output Out. Something counts as on when it’s more than 0, and gates that answer on or off give 1 or 0. An input with no wire keeps the value set here.

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

public float A { get; set; }

Input A. Wire something to it, or set it.

public float B { get; set; }

Input B. Wire something to it, or set it.

public GateKind Kind { get; set; }

What it works out from its inputs A and B: logic (And, Or, Not…), sums or comparisons.

public string Label { get; }

What it’s labeled with in the game: “AND”, “+”, “DELAY”.

public float Out { get; }

Its output, worked out every frame.

public float Value { get; set; }

The number a Constant gives, or the seconds of a Delay or Clock.