/// <summary> /// cleaning up for reuse /// </summary> public void OnDespawnServer(DespawnInfo info) { centComm.OnStatusDisplayUpdate.RemoveListener(OnTextBroadcastReceived); channel = StatusDisplayChannel.Command; textField.text = string.Empty; this.TryStopCoroutine(ref blinkHandle); }
private void OnTextBroadcastReceived(StatusDisplayChannel broadcastedChannel) { if (broadcastedChannel == StatusDisplayChannel.DoorTimer) { statusText = GameManager.FormatTime(currentTimerSeconds, "CELL\n"); channel = broadcastedChannel; return; } if (channel == StatusDisplayChannel.DoorTimer) { return; } if (broadcastedChannel == StatusDisplayChannel.EscapeShuttle) { statusText = centComm.EscapeShuttleTimeString; channel = broadcastedChannel; return; } if (channel == StatusDisplayChannel.EscapeShuttle) { return; } statusText = centComm.CommandStatusString; channel = broadcastedChannel; }
public void UpdateStatusDisplay(StatusDisplayChannel channel, string text) { if (channel == StatusDisplayChannel.EscapeShuttle) { EscapeShuttleTimeString = text; } else if (channel == StatusDisplayChannel.Command) { CommandStatusString = text; } OnStatusDisplayUpdate.Invoke(channel); }