A class in Root.Township, Alta.Logic.
Logic receiver that adds up any number of int inputs and outputs the total. Runs on the server and saves its inputs.
Constructors
| Member | What it is |
|---|
LogicSumIntReceiver() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private int currentValue | Last total sent. |
private IntUnityEvent onValueUpdated | Unity event fired with the new total. |
Methods
| Member | What it is |
|---|
override void InitializeAsServer(SpawnData spawnData) | Server: works out the starting total and fires onValueUpdated with it. |
protected override void ValueUpdated() | When an input changes, fires onValueUpdated if the total changed. |
1 private and internal method
| Member | What it is |
|---|
private int GetValue() | Adds up all input values. |