public void SetRcsLight(bool state)
 {
     if (state)
     {
         rcsLight.SetSprite(1);
     }
     else
     {
         rcsLight.SetSprite(0);
     }
 }
示例#2
0
        /// <summary>
        /// Updates the displayed external tank
        /// </summary>
        private void ServerUpdateExternalTank(bool externalExists)
        {
            GameObject insertedContainer = canister.InsertedContainer;

            if (externalExists)
            {
                externalTankStatus.SetValueServer(insertedContainer.Item().InitialName);
                externalTankImage.SetSprite((int)ExternalTank.TankInserted);
                GasContainer externalTank = insertedContainer.GetComponent <GasContainer>();
                ExternalPressureDial.ServerSpinTo(Mathf.RoundToInt(externalTank.ServerInternalPressure));
            }
            else
            {
                externalTankStatus.SetValueServer("No Tank Inserted");
                externalTankImage.SetSprite((int)ExternalTank.NoTank);
                ExternalPressureDial.ServerSpinTo(0);
            }
        }
示例#3
0
        private IEnumerator WaitForProvider()
        {
            string FormatTime(int timerSeconds)
            {
                if (shuttle.Status == EscapeShuttleStatus.DockedCentcom ||
                    shuttle.Status == EscapeShuttleStatus.DockedStation)
                {
                    return(string.Empty);
                }

                return("ETA: " + TimeSpan.FromSeconds(timerSeconds).ToString("mm\\:ss"));
            }

            while (Provider == null)
            {
                yield return(WaitFor.EndOfFrame);
            }

            console = Provider.GetComponentInChildren <CommsConsole>();

            //starting up, setting appropriate labels
            ProcessIdChange(console.IdCard);
            console.OnServerIDCardChanged.AddListener(ProcessIdChange);
            shuttle = GameManager.Instance.PrimaryEscapeShuttle;

            shuttleStatusLabel.SetValueServer(shuttle.Status.ToString());
            statusImage.SetSprite((int)shuttle.Status);
            shuttle.OnShuttleUpdate.AddListener(status =>
            {
                statusImage.SetSprite((int)shuttle.Status);
                shuttleStatusLabel.SetValueServer(status.ToString());
            });

            shuttleTimerLabel.SetValueServer(FormatTime(shuttle.CurrentTimerSeconds));
            shuttle.OnTimerUpdate.AddListener(timerSeconds =>
            {
                shuttleTimerLabel.SetValueServer(FormatTime(timerSeconds));
            });

            RefreshCallButtonText();

            Logger.Log(nameof(WaitForProvider), Category.Shuttles);
        }
示例#4
0
        private void UpdateElements()
        {
            statusIndicator.SetValueServer(statusColors[Acu.OverallStatus]);

            // Update display's system tray elements
            statusLabel.SetValueServer(Acu.IsPowered
                                        ? ColorStringByStatus(Acu.OverallStatus.ToString(), Acu.OverallStatus)
                                        : string.Empty);
            lockIconSprite.SetSprite(Acu.IsLocked ? 0 : 1);
            lockIconColor.SetValueServer(Acu.IsLocked ? colorNominal : colorCaution);
            powerIconColor.SetValueServer(Acu.IsPowered ? colorNominal : colorAlert);
            Color sampleQualityColor = Acu.ConnectedDevices.Count > 0 ? colorCaution : colorAlert;

            sampleQualityColor = Acu.ConnectedDevices.Count > 2 ? colorNominal : sampleQualityColor;
            connectionIconColor.SetValueServer(sampleQualityColor);
        }
示例#5
0
 public void ReInit(GUI_ChemMaster tab)
 {
     chemMasterTab = tab;
     productImage.SetSprite(transform.GetSiblingIndex());
 }
示例#6
0
 public void SetRcsLight(bool state)
 {
     rcsLight.SetSprite(state ? 1 : 0);
 }
示例#7
0
 /// <summary>
 /// Update entry's internal elements to inform peepers about tracked object updates,
 /// As this entry's value is simply its layout coordinates
 /// </summary>
 public void ReInit()
 {
     icon.SetSprite((int)Type);
     circle.Value = Radius.ToString();
 }