8 protected string output, falseOutput;
20 private int maxOutputLength;
21 [
Editable,
Serialize(200,
IsPropertySaveable.No, description:
"The maximum length of the output strings. Warning: Large values can lead to large memory usage or networking issues.")]
24 get {
return maxOutputLength; }
27 maxOutputLength = Math.Max(value, 0);
37 if (value ==
null) {
return; }
49 get {
return falseOutput; }
52 if (value ==
null) {
return; }
61 [
InGameEditable(DecimalCount = 2),
Serialize(0.0f,
IsPropertySaveable.Yes, description:
"The maximum amount of time between the received signals. If set to 0, the signals must be received at the same time.", alwaysUseInstanceValues:
true)]
85 bool sendOutput =
false;
95 if (
string.IsNullOrEmpty(signalOut)) {
return; }
96 item.
SendSignal(
new Signal(signalOut, sender: signalSender[0] ?? signalSender[1]),
"signal_out");
102 switch (connection.
Name)
107 signalSender[0] = signal.
sender;
112 signalSender[1] = signal.
sender;
void SendSignal(string signal, string connectionName)
float[] timeSinceReceived
EqualsComponent(Item item, ContentXElement element)
override void ReceiveSignal(Signal signal, Connection connection)
override void Update(float deltaTime, Camera cam)
The base class for components holding the different functionalities of the item