8 const float FireCheckInterval = 1.0f;
9 private float fireCheckTimer;
11 private bool fireInRange;
13 private int maxOutputLength;
14 [
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.")]
17 get {
return maxOutputLength; }
20 maxOutputLength = Math.Max(value, 0);
24 private string output;
28 get {
return output; }
31 if (value ==
null) {
return; }
40 private string falseOutput;
44 get {
return falseOutput; }
47 if (value ==
null) {
return; }
62 private bool IsFireInRange()
67 foreach (
Hull hull
in connectedHulls)
80 fireCheckTimer -= deltaTime;
81 if (fireCheckTimer <= 0.0f)
83 fireInRange = IsFireInRange();
84 fireCheckTimer = FireCheckInterval;
87 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)