7 const float FireCheckInterval = 1.0f;
8 private float fireCheckTimer;
12 private int maxOutputLength;
13 [
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.")]
16 get {
return maxOutputLength; }
19 maxOutputLength = Math.Max(value, 0);
23 private string output;
27 get {
return output; }
30 if (value ==
null) {
return; }
39 private string falseOutput;
43 get {
return falseOutput; }
46 if (value ==
null) {
return; }
61 private bool IsFireInRange()
66 foreach (
Hull hull
in connectedHulls)
79 fireCheckTimer -= deltaTime;
80 if (fireCheckTimer <= 0.0f)
83 fireCheckTimer = FireCheckInterval;
86 if (!
string.IsNullOrEmpty(signalOut)) {
item.
SendSignal(signalOut,
"signal_out"); }
bool IsInDamageRange(Character c, float damageRange)
virtual float DamageRange
IEnumerable< Hull > GetConnectedHulls(bool includingThis, int? searchDepth=null, bool ignoreClosedGaps=false)
List< FireSource > FireSources
void SendSignal(string signal, string connectionName)
The base class for components holding the different functionalities of the item
SmokeDetector(Item item, ContentXElement element)
override void Update(float deltaTime, Camera cam)