LogicFloatChangeOnBool
A class in Root.Township, Alta.Logic.
Logic component that moves a float output from a start value to an end value over time while powered, and optionally back when unpowered. Saves its progress.
- Listed in Items, inventory and logic
- Inherits or implements
MonoBehaviour,ISavable<LogicFloatChangeOnBoolSaveData>,ISavableSave<LogicFloatChangeOnBoolSaveData>,ISavableSaveBase - Derived types
LogicFloatChangeOnBoolSaveData - Documented in Other systems
Constructors
| Member | What it is |
|---|---|
LogicFloatChangeOnBool() | Creates a LogicFloatChangeOnBool with default values. |
Fields
12 private and internal fields
| Member | What it is |
|---|---|
private float currentProgress | Progress from 0 to 1 along the current direction. |
private float currentTimer | Time waited since the last direction change. |
private float endValue | Value sent at the end of the move. |
private bool errorMessagePosted | Stops the missing-sender warning from repeating. |
private bool isPowered | Whether the input is on. |
private float moveSpeedPerSec | How fast the value moves, in value units per second. |
private bool movingForward | True while moving from start to end. |
private bool oneWay | When set, does not turn around at the end. |
private bool returnToStartIfUnpowered | Whether to move back to the start value when power goes off. |
private LogicFloatSender sender | Float sender the value is output on. |
private float startValue | Value sent at the start of the move. |
private float timeBeforeMoving | Seconds to wait before moving after a direction change. |